Prateek Posted January 1, 2019 Posted January 1, 2019 Hi, I have a simple issue, may it seems simple, I am trying to automate a thing in web browser now my problem statement is as follows - I want to pause my script until the web page gets loaded completely. I tried WinWaitActive but it works if a new window is getting loaded with a different title while in my case the title of the web page remains the same. So WinWaitActive doesn't work here. Thanks.
Moderators JLogan3o13 Posted January 1, 2019 Moderators Posted January 1, 2019 @Prateek it depends on how you are automating your "thing", you aren't providing enough information. Are you using the IE UDF? The Chrome UDF? Something else? How about posting your code, along with detailed info on the "thing" you're trying to automate, rather than having us guess "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Prateek Posted January 1, 2019 Author Posted January 1, 2019 Hi, Code is just few lines. The URL is remote so won't work on your system. But this URL takes 20 seconds to open. After the URL is open i am just maximizing the screen. Not much. The win wait is not working because the URL is already open so it doesn't wait for the window to be active because it is already active. I just click button and some chart appears on the page so title remains same as the same page reloads. WinWaitActive("https://wiks.corp.idea.com/wiks/servlet/ComputeServlet?action= - \\Remote") Send("{ALTDOWN}") Send("{SPACE}") Sleep(1000) Send("{ALTUP}") Sleep(1000) Send("x") Thanks
Moderators JLogan3o13 Posted January 1, 2019 Moderators Posted January 1, 2019 I would suggest looking at the IE sections in the file. Send is inherently unstable, and will not always produce the results you are expecting. If you open the page with _IECreate, for example, you have the option to wait until the page is fully loaded before doing anything else. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Prateek Posted January 1, 2019 Author Posted January 1, 2019 Hi, The remote URL is on citrix platform, So _IE functions are not running. I had tried those initially.
Moderators JLogan3o13 Posted January 1, 2019 Moderators Posted January 1, 2019 Information which would have been useful in your first post, rather than leaving us to guess. Have you done a forum search on Citrix? I know for a fact you'll find several hundred threads concerning how to automate it. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Prateek Posted January 5, 2019 Author Posted January 5, 2019 I searched the forum and found nothing over citrix.....My only query is how to pause my script while the browser gets loaded completely....can anyone assist? Urgently needed
Nine Posted January 5, 2019 Posted January 5, 2019 (edited) How do YOU know when browser gets completely loaded ? Edit : funny you say it is urgent, but you don't even take a moment to answer a simple question, fine have fun finding help. Btw I know you have read this... Edited January 5, 2019 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
c.haslam Posted January 6, 2019 Posted January 6, 2019 I find searching using Google (which I don't otherwise use), sometimes finds stuff that the AutoIt website search doesn't (but maybe it's just me). Here is my script: Opt('TrayIconDebug',True) Local $ans = InputBox("Search AutoIt docs","Search for") if @error then Exit Local $firefoxpath = 'Program Files\Mozilla Firefox\firefox.exe' Local $drvsVec = DriveGetDrive('FIXED') For $i = 1 to UBound($drvsVec)-1 $firefoxFilspc = $drvsVec[$i]&'\'&$firefoxpath If FileExists($firefoxFilspc) Then ExitLoop Next Run('"'&$firefoxFilspc&'" -new-window https://www.google.ca/?gws_rd=ssl' ) WinWait('Google') Sleep(3000) Local $t = 'site:https://www.autoitscript.com '&$ans Send($t,1) Send('{Enter}',0) It can be simpler -- and smarter. Spoiler CDebug Dumps values of variables including arrays and DLL structs, to a GUI, to the Console, and to the Clipboard
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