Download the following image and put it in your mIRC folder:
http://img385.imageshack.us/img385/8039/runiconhh6.png
Then just load the remote.
To open the RUN Dialog you have to type: /mirc.run
It Keeps History of the entries you typed too
And they are cleared when the entries reach 10.
Sry for my english ^-^
Here is the screenshot:
dialog run {
title "Run"
size -1 -1 340 158
option pixels
icon 1, 11 18 40 40, noborder
text "Type the name of a program,", 2, 60 8 234 18
text "folder, file or Internet resource and Windows", 3, 60 22 234 18
text "will open it.", 4, 60 36 234 18
text "Open:", 5, 8 82 38 18
button "OK", 7, 51 110 66 24, ok
button "Cancel", 8, 119 110 66 24, cancel
combo 6, 51 81 246 70, edit hsbar drop
button "Browse..", 9, 187 110 66 24
button "Clear History", 10, 255 110 77 24
}
on *:dialog:run:sclick:9:{
set %run.dir $sfile(C:)
did -i run 6 0 %run.dir
}
on *:dialog:run:sclick:10:{
clrmemory
history.check
dialog -t run History cleared.. | .timer 1 1 tChange
}
alias -l tChange $iif($dialog(run),dialog -t run Run)
on *:dialog:run:sclick:7:{
if ($did(6) == $null) { dialog -x run | halt }
if ($did(6) == regedit) {
if ($hget(run) != run) { hmake run 10 }
var %i = 1
while (%i <= %added.progs) {
if ($hget(run,%i) == $did(6)) { run regedit | dialog -x run | halt }
inc %i
}
run regedit
inc %added.progs
hadd run %added.progs $did(6)
dialog -x run
halt
}
if ($did(6) == msconfig) {
if ($hget(run) != run) { hmake run 10 }
var %i = 1
while (%i <= %added.progs) {
if ($hget(run,%i) == $did(6)) { run msconfig | dialog -x run | halt }
inc %i
}
run msconfig
inc %added.progs
hadd run %added.progs $did(6)
dialog -x run
halt
}
if ($did(6) == cmd) {
if ($hget(run) != run) { hmake run 10 }
var %i = 1
while (%i <= %added.progs) {
if ($hget(run,%i) == $did(6)) { run cmd | dialog -x run | halt }
inc %i
}
run cmd
inc %added.progs
hadd run %added.progs $did(6)
dialog -x run
halt
}
if ( $exists($did(6)) == $true ) {
if ($hget(run) != run) { hmake run 10 }
var %i = 1
while (%i <= %added.progs) {
if ($hget(run,%i) == $did(6)) { run $did(6) | dialog -x run | halt }
inc %i
}
inc %added.progs
run $did(6)
hadd run %added.progs $did(6)
}
else { dialog -t run File does not exist. | .timer 1 1 dialog -t run Run }
}
alias mirc.run /dialog -m run run
on *:dialog:run:init:0:{
if ($isfile($qt($mircdirruniconhh6.png))) { did -g run 1 $qt($mircdirruniconhh6.png) }
history.check
}
alias -l clrmemory /set %added.progs 0 | /hfree run | /hmake run
alias -l history.check {
if (%added.progs >= 1) && (%added.progs < 10) {
var %i = 1
while (%i <= %added.progs) {
did -a run 6 $hget(run,%i)
inc %i
}
}
else {
var %i = 1
while (%i <= $did(6).lines) {
did -r run 6 %i
inc %i
}
}
}
on *:EXIT:{ hsave run runhistory.txt }
on *:START:{ hmake run | hload run runhistory.txt }
StaticX__: Perhaps disabling the OK button on the dialog init event will help to solve your OK button issues? Change the init event for the run dialog to this:
ON *:DIALOG:run:init:0: {
history.check
did -b run 6
}
Also, you will want to enable this feature when the combo-box is editted/sclicked:
ON *:DIALOG:run:*:6: {
if (($devent == sclick) || ($devent == edit)) {
did - $+ $iif($remove($did(6),$chr(32)) != $null,e,b) run 7
}
}
You get an error if you click 'Clear History' and then close the dialog immediately. This is because of the timer for that command. Use this in place of your clear event, plus the timer event:
on *:dialog:run:sclick:10:{
if ($hget(run)) {
clrmemory
history.check
dialog -t run History cleared.. | .timer 1 1 tChange
}
}
alias -l tChange $iif($dialog(run),dialog -t run Run)
Also, when I clicked on Clear History without having a history, I got this error: * /hfree: no such table 'run' . This is because there is no error-checking for if the table exists. You will notice that in the above code, I have already included the fix for this, which is: if ($hget(run)) { ... }. Essentially, your best option would be like the one I have for the OK button, which would be to disable the Clear History button until a history has been made. Enjoy!
The main trouble is the file you tell us to get is called runiconth3.png and the one that you've told the script of yours to load in the dialog is called runicon.bmp. So, hence, you get this error:
* /dialog: 'run' error loading icon 'C:\mIRC\runicon.bmp' (line 55, mircrun.mrc)
A simple fix got me the dialog up and running. It never gave me the right information, as well it will create multiples of the same entry if you do the same run twice. Also, the first run is never saved.
Another big issue is that you've set variables as well as hash entries. Why not use the hash table for everything?
There is no unload feature, so it's impossible to unload your hash table unless you shut mIRC off or type: /hfree run.
This snippet has given me an idea ;-)