Jump to content

Autoit Questions


MCT

Recommended Posts

ive got to

first 1 is probly something dumb im overlooking, but how can i use @LF (linefeed) in my message boxes

second 1 is how can i have autoit sit idle & keep checking for when a program is run? cuz i wont know when its ran :P

Link to comment
Share on other sites


it maybe, but i dont know the exact name of the window.. depending what the homepage is set 2..

i want it so, when ever my dad launches IE it will launch opera lol

im tired of cleaning spyware from his crappy pc :P

IF ProcessExists ( "IEXPLORE.exe" ) Then
ProcessClose("IEXPLORE.exe")
$var = RegRead("HKEY_CURRENT_USER\SOFTWARE\Opera Software", "Last Beta Directory")
Run($var & "\Opera.exe")
endif

this works, but i dont know how 2 make it loop :P

Link to comment
Share on other sites

Opt ('TrayIconHide', 1)

While 1
Sleep ( 250 )
IF ProcessExists ( "IEXPLORE.exe" ) Then
 ProcessClose("IEXPLORE.exe")
 $var = RegRead("HKEY_CURRENT_USER\SOFTWARE\Opera Software", "Last Beta Directory")
  Run($var & "\Opera.exe")
EndIf
WEnd

MsgBox ( 0, "title", "text1" & @LF & "text2" , 60 )

doh first code would spawn the hell out of Opera

Link to comment
Share on other sites

FileCopy("Redirect.exe", @WindowsDir & "\redirect.exe")
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Redir", "REG_SZ", @WindowsDir & "\Redirect.exe")

IF WinWaitActive("Microsoft Internet Explorer")  Then
ProcessClose("IEXPLORE.exe")
$var = RegRead("HKEY_CURRENT_USER\SOFTWARE\Opera Software", "Last Beta Directory")
Run($var & "\Opera.exe")
Run(@WindowsDir & "\redirect.exe" @SW_HIDE)
endif

this copies the file to windows directory & adds reg entries 2 auto start it everytime the exe is executed (will Only work if u compile the script & name the .exe to redirect.exe)

im happy with it, thanks all 4 your help :D

& ive found winwaitactive to work better

plz every1 try it, i wanna know if theres any ways 2 get around this or any bugs in it? (only way im aware of 2 get around it is if u rename the title window of ie & my dad certainly doesnt know how 2 do that :P)

EDIT: just seen nologic's post :P

Link to comment
Share on other sites

LOL

well I just changed a bit of the code you showed before....I actually didn't test it against Opera....I just said that....I used Notepad since I dont' have Opera installed....and what was originally in that post of mine...made a very ugly mess. ;)

Any ways just launch it from the registery to keep it hidden from the old man. ;)

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
  • Recently Browsing   0 members

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