Jump to content

Open Shortcut


parkerbl
 Share

Recommended Posts

Hey guys...I have once again came to seek the help from you guys. I'm sure that it is something really simple, and it might be something that I am overlooking, but I can't seem to find anything to resolve this. What I am wanting to do basically is this. I need a program that is constantly running and checking to see if IE is running. If IE is terminated, it opens up a new window according to that shortcut. So, I have this program in a constant while loop checking to see if the IE process exists, and if it doesn't exist, then run that shortcut. I can't just open a new IE window, because the shortcut runs an IE window that is a full screen document. So basically is there any way to just run a shortcut in the same directory. Thanks if advance guys.

Link to comment
Share on other sites

Well, I have seemed to figure out some kind of solution for it. I just have the AutoIT script in a loop testing to see if the internet explorer process exists, and if it doesn't, then run a batch file that points to that shortcut. But when that AutoIT script is running that is checking to see if the internet explorer window is open, it is a loop and it is taking up 98/99 percent of memory. Is there any other way to constantly monitor the processes, and open a process if one is closed?

Link to comment
Share on other sites

Hey guys, thanks for the help so much. All of you guys have been a tremendous help. Here's what I ended up doing that seems to work fine:

CODE
Run("C:\run.bat")

ProcessWait("iexplore.exe")

Call("process")

Func process()

ProcessWaitClose("iexplore.exe")

Run("C:\run.bat")

ProcessWait("iexplore.exe")

Call("process")

EndFunc

Link to comment
Share on other sites

parkerbl... You obviously don't understand the use of Call. Call is to be used when you don't know

the function-name to call at the time you write the script, and can be used to create dynamic scripts :

$num = @SEC
Call("myfunc" & $num)oÝ÷ Ù*,wʤ-çîËb¢yÚæ­¶­g²¢ì+×­ë®*m¶«{lÞjÊ'¶¬x&¥»­{-y§r¢ë!¢é]q©e¶ºw-Ý·¶¥G­+ºÚ"µÍØÙÜÊ
oÝ÷ Ù'¢weË*.ßÚÞ±Êâ¦Ü"W«®èºÖµêÚÂ¥zȧq쨺·îËb¢yÚçjºi®²Ê®¢×["¶Ç¥~W¾)àÙèÁ¬­¡ëj­çîËb¢r7ö÷®±çZ²v¤y«ëZ¦+mçè­æ§u¨|Z²v¤y¸­x"·l£  íj)H·¥éݺ"¶h¶ÊnZ(v
+y©Ý¢w®º+ë,{Zx§Ø^Âݪê-­ç.®È¯z«¨µ:ò²¶§X¤zØb²)ìµæjëh×6Run("C:\run.bat")
ProcessWait("iexplore.exe")

While 1
    ProcessWaitClose("iexplore.exe")
    Run("C:\run.bat")
    ProcessWait("iexplore.exe")
WEnd

EDIT : Added the two lines in start of code..

Edited by Helge
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...