January 10, 200521 yr Hi,I am trying to auto-associate mIRC with irc:// links. the only way to accomplish this seems to be to open mIRC, and then close it.can anyone make a AutoIt Script (exe) to open: "%systemdrive%\Program Files\sysreset\mirc.exe", and then close it once it loads?
January 10, 200521 yr couldnt you just open it and taskkill it? or do you have to wait untill it fully loads
January 10, 200521 yr run("%systemdrive%\Program Files\sysreset\mirc.exe")sleep(5000)winclose("nameofwindowhere")try that.
January 10, 200521 yr Author Run("%systemdrive%\Program Files\sysreset\mirc.exe")sleep(5000)winclose("mIRC")EXITI used this code, but it doesn't work...it says it cannot find the file.however, i checked a million times, that is the correct path.can autoit use %systemdrive%? or maybe the problem is the space between 'Program' and 'Files'??Here is a screenshot of the error, as well as the Program directory to show the file exists. Edited January 10, 200521 yr by a06lp
January 10, 200521 yr in AUTOIT you can't use the system variables like that it needs to process them differently, try :Run( @ProgramFilesDir & "\sysreset\mirc.exe")sleep(5000)winclose("mIRC")EXITThat should help the context for you
January 10, 200521 yr Welcome.I wonder though if you couldn't just run a Registry file to accomplish the same thing, find out which key is being hit to make the association, and just use that instead. Would do away with having to run the program once.Ahh well something to look into. Enjoy
January 18, 200521 yr Author Run( @ProgramFilesDir & "\sysreset\mirc.exe")sleep(5000)winclose("mIRC")EXITok, slight problem with this method.works perfectly, in that it opens mIRC, and then closes it.however, when testing it on a clean install, i noticed that when mIRC opens, the "Windows Firewall" opens and asks what to do (unlock, etc.).Is there any way to add: "If windows firewall opens, then close it", so that IF the window opens, it is closed by this same autoit script?
January 18, 200521 yr Run( @ProgramFilesDir & "\sysreset\mirc.exe" )WinWaitActive( "mIRC" )WinClose( "mIRC" )If WinExists( "Windows Firewall" ) Then WinClose( "Windows Firewall" )EXIT
January 18, 200521 yr Author the above code has the right idea, but didn't work.here is the working modified code:Run( @ProgramFilesDir & "\sysreset\mirc.exe" )WinWaitActive( "mIRC" )WinClose( "mIRC" )If WinExists( "Windows Security Alert" ) Then WinClose( "Windows Security Alert" )EXIT
January 18, 200521 yr Using a batch-file is far easier for future changes, ease-of-use, etc.start %ProgramFiles%\mIRC\mirc.exeREM to wait 10 secondssleep 10pskill mirc.exeget pskillget sleepThe best part is, you can put those additional EXEs in your System32 folder and use them later on for other purposes as well.
January 18, 200521 yr a06lp -Well didn't know the window title. prathapml -Yes those are handy, but they don't close the window that he's needing closed...or at least not with the code shown...or the extent of my know how.
January 19, 200521 yr They do actually. The commands will start mirc.exe and close it. If I'm not mistaken, that's what is needed?
January 19, 200521 yr Security alert from SP2, right?Similarly, windows messenger, yahoo messenger, k-lite all these give the alert too. [HOWTO]: Pre-configure the windows firewall , blocking/allowing apps
Create an account or sign in to comment