Jump to content

Running script "in background"


Recommended Posts

Hi peeps.Can some1 tell me how to make script run in minimized window?I made this little script that opens web certain site and logs in and out(to gain lvls,don't ask),but how can i make it run in min mode?I use {TAB} to switch between log in and out buttons,so when i switch to other window it starts jumping through by pressing TAB button.How do i make it to run "in background" like,so i can do something else-browse internet ie.???

Plz help.

Link to comment
Share on other sites

$vAccount = IniRead("config.ini", "Account", "password", "Account key not found")

$vWeb = IniRead("config.ini", "Web", "web", "Web key not found")

$i = 0

AutoItSetOption("MouseCoordMode",0)

loadMozilla()

AdlibEnable("MozillaCheck")

HotKeySet("^!x", "MyExit")

gotoCustomPc()

logIn()

repeat()

myExit

AdlibDisable()

Func MozillaCheck()

If WinExists("Custom PC - Mozilla") == 0 Then

MsgBox(0,"My Bot","You need Mozilla to run, and the window is not present in memory.")

Exit

EndIf

EndFunc

Func loadMozilla()

Run("C:\Program Files\mozilla.org\Mozilla\mozilla.exe")

Sleep(4000)

EndFunc

Func gotoCustomPc()

Send("^+l")

ClipPut($vWeb)

Send("^v")

Send("{ENTER}")

Sleep(4000)

EndFunc

Func logIn()

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")

Sleep(3000)

Send("{SHIFTDOWN}")

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}")

Send("{SHIFTUP}")

Sleep(500)

ClipPut($vAccount)

Send("^v")

Send("{ENTER}")

Sleep(3000)

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")

Sleep(3000)

EndFunc

Func repeat()

Do

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")

Sleep(3000)

Send("{SHIFTDOWN}")

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}")

Send("{SHIFTUP}")

Sleep(500)

ClipPut($vAccount)

Send("^v")

Send("{ENTER}")

Sleep(3000)

Send("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}")

Sleep(3000)

$i = $i + 1

Until $i = 100

EndFunc

Func myExit()

Exit

EndFunc

Link to comment
Share on other sites

Use ControlSend("Custom PC - Mozilla","","","what ever was in Send") instead of Send("what ever was in Send")

and:

{TAB 8} = {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}

Edited by Ejoc
Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs
Link to comment
Share on other sites

Guest fwolz19

I don't know if anyone actually answered this or I am just misunderstanding the answer but how do we run things in the background, minimized? I want to authenticate to my network while playing Final Fantasy. If anything takes Final Fantasy out of fullscreen mode it shuts down, so I need my IE window to open without disrupting that. I tried GUISetState(@SW_MINIMIZE) and WinSetState(@SW_MINIMIZE) . I put them right before I ran the IE executable and got an error. Thanks to anyone who can help

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...