Jump to content

Script in Background


 Share

Recommended Posts

I am fairly new to AutoIt and have been searching the forums but I cant figure out how to search for what im looking for. I want to be able to run this Script on a certain program in the background so it doesnt stop working while I am searching the Internet, any help would be appreciated.

While 1     
    Send(".") 
    sleep(1000 * 25)
    Opt("SendKeyDownDelay", 2900)  ;5 second delay 
Send(".") 
Opt("SendKeyDownDelay", 5)  ;reset to default when done
WEnd
Link to comment
Share on other sites

Hi And Welcome,

not sure what your trying to do here but a hotkey might be the way to go:

HotKeySet("{F8}", "_f8")

While 1
    Sleep(28800)
WEnd

Func _f8()

    Send(".") 
    sleep(1000 * 25)
    Opt("SendKeyDownDelay", 2900) ;5 second delay 
    Send(".") 
    Opt("SendKeyDownDelay", 5) ;reset to default when done

EndFunc ;==>_f8

This will run in your tray and wait until you hit "F8 to do whatever it is that it does ;-)

Good Luck!

Link to comment
Share on other sites

what program ?

And did you take note of Yoriz's post?

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Ah...

here is a little proggy I wrote to start iTunes and then click a window that popsup and closes the proggy.

Perhaps it will help you on your journey...

;Run process
ShellExecute("iTunes")

;Allow window to initialize...
WinWaitActive("Connect to rss.premiereradio.net")

If WinExists("Connect to rss.premiereradio.net") Then
    ControlClick("Connect to rss.premiereradio.net", "", "[CLASS:Button; INSTANCE:2]")

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