Sign in to follow this  
Followers 0
sksguy

Very New - Need help with variable

8 posts in this topic

For whatever reason I cant seem to get my script to send a variable using the SEND command

$count = 1

Send ("$count")

$count = $count+1

yadda yadda

Could someone help me with why it types the actual characters ($count) instead of the variable 1

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

send($count)

its a variable... thus no quotes

For $x = 1 to 10
    
    $count = 1
    Send ($count)
    $count = $count+1
    
    Sleep(100); slow it down a little
    
Next

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Worked......thank you

One more question. How do I pause a script until a webpage is fully loaded?

I tried

WinWaitActive to pause it but it only pauses until the window is physically there, not until the content is finished loading.

I used a sleep command for now, but it not efficient at all this way.

Thanks in advance... This is my first steps into this exciting world and Im loving it already

Cheers all

Share this post


Link to post
Share on other sites

yea... i ued winwaitactive... then a sleep also

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

send($count)

its a variable... thus no quotes

For $x = 1 to 10
    
    $count = 1
    Send ($count)
    $count = $count+1
    
    Sleep(100); slow it down a little
    
Next
just sayin... doing the $count = $count+1 doesnt do anything :P

you need to make $count = 1 BEFORE the For statement... like

$count = 1
For $x = 1 to 10
        
    
    Send ($count)
    $count = $count+1
    
    Sleep(100); slow it down a little   
Next

if you didnt already know that

Share this post


Link to post
Share on other sites

Welcome to the forums!

One more question. How do I pause a script until a webpage is fully loaded?

The browser probably displays something along the lines of 'Done' when the page has finished loading. Perhaps something like this will do the trick:

WinWait('Title of web page', 'Done')

When you want to get more advanced, Dale's IE automation UDF library will help you achieve this more seamlessly.

Share this post


Link to post
Share on other sites

Thanks everyone. Dales little gem has helped me figure out the problem perfectly.

Share this post


Link to post
Share on other sites

But if you want wait loading page in FireFox, then im using PixelGetColor(). Im getting color from "Stop" button in my browser, and while "Stop" button is red, my script sleeps...

I hope you understand my text, because my english is very bad :P

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