MichaelCrawley Posted January 31 Share Posted January 31 I do some scripting at my current position nothing to advanced. I am looking into creating a script that will open two different web pages at full screen then switch focus between them after a defined amount of time. I know this sounds simple but I have never used AutoIT and the videos with AutoIT don't seem to cover this topic. I am not looking for the script to but I really looking for the resources to used so I can do it myself. Link to comment Share on other sites More sharing options...
Developers Jos Posted January 31 Developers Share Posted January 31 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
MichaelCrawley Posted January 31 Author Share Posted January 31 My apologies, how do I delete/remove my question or is this something you can do? Link to comment Share on other sites More sharing options...
Developers Jos Posted January 31 Developers Share Posted January 31 It is moved already as you can see. (It is just one click for us to move an post that standard message) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Danp2 Posted January 31 Share Posted January 31 I suggest that you expand on your description of the task to be performed. For example -- Which browser will be used? Is it set as the default browser? Do the two websites need to be in two completely separate windows or can they be in a single window with tabs? Do either of the sites require you to authenticate or login? etc To get thing started, you can launch two websites into a tabbed window of the default browser using the ShellExecute command -- ShellExecute("www.yahoo.com") ShellExecute("www.google.com") WebDriver UDF [GH&S] Latest version Wiki FAQs Link to comment Share on other sites More sharing options...
MichaelCrawley Posted January 31 Author Share Posted January 31 Devices reboots daily The device does not have access to the internet so these internal sites There is no authentication required. Full screen is a requirement The "Focus: or active page can be using tabs or and be multiple browsers the script come on at start up and automatically load and go to full screen I need a 30 second pause before focus changes Computer is on 24x7 Users do not have access to the device is a display only device remotely manged Link to comment Share on other sites More sharing options...
Solution Danp2 Posted January 31 Solution Share Posted January 31 Here's a simple example that should be enough to get you started -- AdlibRegister("Toggle", 2000) Run("C:\Program Files\Google\Chrome\Application\chrome.exe www.google.com www.yahoo.com") While True Sleep(500) WEnd Func Toggle() Static $bFirst = True WinActivate("Chrome") If $bFirst Then Send("^2") Else Send("^1") EndIf $bFirst = Not $bFirst EndFunc Some commentary -- Send() is generally frowned upon, but it should work ok in your controlled environment The switch is currently set to every 2 secs. Adjust the value in the first line to meet your needs. WebDriver UDF [GH&S] Latest version Wiki FAQs Link to comment Share on other sites More sharing options...
MichaelCrawley Posted January 31 Author Share Posted January 31 Wow.... I just tested and it worked really well. I will just hoping to get pointed in the right direction not a full solution. I would have spent hours on this thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now