Sign in to follow this  
Followers 0
Sherm

Script in Background

8 posts in this topic

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

Share this post


Link to post
Share on other sites



To make your send work on a particular window, use ControlSend instead.


GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.

Share this post


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

Share this post


Link to post
Share on other sites

OK thank you the Hotkey Helps out but I guess I wasn't clear enough, I cant figure out how to make the script run only for a specific program.

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

what program ?

It is for the original Fallout, I want it to auto shoot when I have the game alt-tabbed.

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