mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 16
D
DynaMup Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jan 2003
Posts: 16
Is there a way to bring up the standard Windows "Open" control (where you double-click on an icon to open a file, or run something, etc) so that a hash table can be loaded?

I'm not so good at explaining these things smile

Basically, when the user clicks "Load" from the menu (id 4), I'd like a window to open displaying all files that end in .chr (an extension chosen by me), and when they double-click the icon, it simply loads the hash table up.

The code below works, but the user has to type in the filename manually to save and load. I guess what I need to know is how to access the standard windows Save / Open box.

Code:
  
on *:dialog:build1:menu:3:{
  hsave -s CharSheet $$?.chr
}

on *:dialog:build1:menu:4:{
  hfree -sw CharSheet
  hmake -s CharSheet
  hload -s CharSheet $$?.chr
}



Sorry for being convoluted - I know what I want, but I'm not sure of the best way to phrase it! smile


A poor life this, if full of care,
We have no time to stand and stare.
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help $sfile


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
There's $sfile, but from the sounds of it that probably won't be flexible enough to do what you want. I'm pretty sure there's a DLL (maybe two) that can be used to access the standard windows dialogs. Unfortunately I can't remember the name of either of them.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2003
Posts: 16
D
DynaMup Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jan 2003
Posts: 16
Ahh, I thought it might be something to do with DLL's.

I'm sure I've seen this kind of feature before (like with mp3 playing scripts, so you can just double-click an mp3 to start playing it within mIRC).

All I want is the dialog box you get as standard whenever you click "Open" or "Save As" in most Windows applications.


A poor life this, if full of care,
We have no time to stand and stare.
Joined: Jan 2003
Posts: 16
D
DynaMup Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Jan 2003
Posts: 16
Okay, so I'm being a schizophrenic and answering my own posts smile

I've found a useful DLL called EDialogs which has allowed me to do exactly what I want with my script, so no more need for any head-scratching on my account.

Thanks for replying! smile


A poor life this, if full of care,
We have no time to stand and stare.
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
var %File.To.HLoad = $+(",$$sfile($mircdir*.chr,Open Character Sheet,Load),")
hload %File.To.HLoad


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C

Link Copied to Clipboard