Sign in to follow this  
Followers 0
Dylpickled12

Need help running script!

3 posts in this topic

I have written a basic script

HotKeySet("\", "TORONTO")

Func TORONTO ()

send ("{Enter}")

$Title = WinGetTitle("[active]")

$text = ControlGetText($Title, "", "Edit22")

$text2 = StringReplace($text2, "_u.TO", ".UN-TC")

$text2 = StringReplace($text2, ".TO", "-TC")

sleep (500)

$linktext = StringReplace($text, "_u.TO", "-U.TO")

$linktext = StringReplace($text, "_", "-")

$linktext = StringUpper($linktext)

$Title2 = $linktext & " - Depth"

Sleep ( 175)

ControlFocus($Title2, "", "Edit1")

Sleep ( 175)

ControlSetText($Title2, "", "Edit1", $text2 )

Sleep ( 100 )

ControlSend($Title2, "", "Edit1", "{ENTER}")

EndFunc

Which I copied off of someone and know that it should work. I saved the script to my desktop, clicked compile script and then the file that appeared I clicked 'Open' but it doesn't show up in my task manager and isn't running. Is there something I am missing?? Thanks in advance.

Share this post


Link to post
Share on other sites



Hello Dylpickled12,

That script will take less than a second to run, and it will only run once...you need to add a sleep to wait for your hotkey command.

Try this:

HotKeySet("\", "TORONTO")

While 1
    Sleep(100)
WEnd

Func TORONTO ()
    send ("{Enter}")
    $Title = WinGetTitle("[active]")
    $text = ControlGetText($Title, "", "Edit22")
    $text2 = StringReplace($text2, "_u.TO", ".UN-TC")
    $text2 = StringReplace($text2, ".TO", "-TC")
    sleep (500)
    $linktext = StringReplace($text, "_u.TO", "-U.TO")
    $linktext = StringReplace($text, "_", "-")
    $linktext = StringUpper($linktext)
    $Title2 = $linktext & " - Depth"
    Sleep ( 175)
    ControlFocus($Title2, "", "Edit1")
    Sleep ( 175)
    ControlSetText($Title2, "", "Edit1", $text2 )
    Sleep ( 100 )
    ControlSend($Title2, "", "Edit1", "{ENTER}")
EndFunc

Good Luck

Realm


My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

Thank you! That was exactly the problem..

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