Jump to content

Recommended Posts

Posted

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
Posted

@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!

Posted

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
Posted

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!

  • Moderators
Posted

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!

Posted

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

Posted (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 by Nine
Posted

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

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...