Sign in to follow this  
Followers 0
Ctwizzy

Paste into Flash Interface

4 posts in this topic

I frequent a website designed entirely in flash, its really annoying.

Anyways in order to access a certain part of the site you need a key, so you request a key and the app sends it to your email.

key is numeric: "12-345-67". Of course the flash web app has 3 boxes to enter this key, and copy pasting it all in segments is a pain. So I saw this app can do scripts.

So basically what im trying to do is, whatever I have copied in clipboard, just paste it.

for example:

$clipb = ClipGet() ;Get the Contents of the clipboard

$parts = StringSplit($clipb, '-')

Send("" & $parts[1] & "{TAB}" & $parts[2] & "{TAB}" & $parts[3] & "{TAB}" )

I then compile this app, and have a keyboard macro program for running the exe.

All I then want is whenever the keyboard macro is hit, it pastes the clipboard as so.

Im trying to get this to work and so far whenever it runs myscript.exe it loses focus. I just want it to paste whereever I am at that time, in the flash app.

Would appreciate some guidance.

Thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I think the best way to do this is to run your script in a While/WEnd loop and put your Send... statement as a Hotkey.

Example:

HotKeySet("{F8}", "SendIt")

While 1
    Sleep(250)
WEnd

Func SendIt()
    $clipb = ClipGet()  ;Get the Contents of the clipboard
    $parts = StringSplit($clipb, '-')
    Send($parts[1] & "{TAB}" & $parts[2] & "{TAB}" & $parts[3] & "{TAB}" )
EndFunc

Or something like that. That way you will not lose focus on the screen when you run your app. Another way is to just put a Sleep(3000) or so in the beginning of your script so that you have time to click on the screen before your script starts.

Edited by SerialKiller

Share this post


Link to post
Share on other sites

I think the best way to do this is to run your script in a While/WEnd loop and put your Send... statement as a Hotkey.

Example:

HotKeySet("{F8}", "SendIt")

While 1
    Sleep(250)
WEnd

Func SendIt()
    $clipb = ClipGet()  ;Get the Contents of the clipboard
    $parts = StringSplit($clipb, '-')
    Send($parts[1] & "{TAB}" & $parts[2] & "{TAB}" & $parts[3] & "{TAB}" )
EndFunc

Or something like that. That way you will not lose focus on the screen when you run your app. Another way is to just put a Sleep(3000) or so in the beginning of your script so that you have time to click on the screen before your script starts.

hotkeys are definitely the way to go... I would also suggests placing a WinActivate right before you paste the values in


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites

Thanks Serial that did the job!!

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