Sign in to follow this  
Followers 0
parkerbl

Open Shortcut

7 posts in this topic

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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

While 1
    If ProcessExists("ie.exe") Then
        Run("Whatever.exe")
    EndIf
    Sleep(100)
WEnd

Is this what you're looking for?


Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite

Share this post


Link to post
Share on other sites

Without seeing your code, its hard to help, but do you have any sort of pause between executions of the loop?


Pink Floyd - The Wall

Share this post


Link to post
Share on other sites

To idle the cpu: add a sleep statement in the loop (as in post #3)

To start a shortcut:

$file = "MyShortcut.lnk"
Run("rundll32 url.dll, FileProtocolHandler " & $file)

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0