Sign in to follow this  
Followers 0
Guest JaxFlMax

Send() and ControlTextSet()

5 posts in this topic

I grabbed some really usefull code for inserting serial keys with dashes/spaces automatically from the forums and it worked great but now i'm trying to modify it to use a serial that is in the clipboard.

Here's an example of one of my attempts:

$serial = InputBox ("Serial Getter", "Serial Number")
if $serial='' then Exit
WinActivate ("Serial Getter")
ControlFocus ("Serial Getter", "Edit1")
Sleep(100)
Send("^v")
$serial = StringReplace( $serial, '-', '' )
$serial = StringReplace( $serial, ' ', '')
WinActivate ( "Adobe Premiere Pro 1.5 Setup")
Send ( $serial )

Whether I'm trying to use ControlSetText or just Send("v") it will not paste the # into my InputBox, but if i hit ctrl-v by hand it will.

Please help!

Share this post


Link to post
Share on other sites



I grabbed some really usefull code for inserting serial keys with dashes/spaces automatically from the forums and it worked great but now i'm trying to modify it to use a serial that is in the clipboard.

Here's an example of one of my attempts:

$serial = InputBox ("Serial Getter", "Serial Number")
if $serial='' then Exit
WinActivate ("Serial Getter")
ControlFocus ("Serial Getter", "Edit1")
Sleep(100)
Send("^v")
$serial = StringReplace( $serial, '-', '' )
$serial = StringReplace( $serial, ' ', '')
WinActivate ( "Adobe Premiere Pro 1.5 Setup")
Send ( $serial )

Whether I'm trying to use ControlSetText or just Send("v") it will not paste the # into my InputBox, but if i hit ctrl-v by hand it will.

Please help!

<{POST_SNAPBACK}>

AutoIt will not continue execution until you have closed the Inputbox.

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

AutoIt will not continue execution until you have closed the Inputbox.

<{POST_SNAPBACK}>

It seems though that the InputBox itself will not accept any Send or ControlClick commands to close it. If this is a known problem then i'll learn to live with it.

Share this post


Link to post
Share on other sites

It seems though that the InputBox itself will not accept any Send or ControlClick commands to close it.  If this is a known problem then i'll learn to live with it.

<{POST_SNAPBACK}>

You mean from another autoit3 script ?

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You mean from another autoit3 script ?

<{POST_SNAPBACK}>

Nevermind, you found my problem the first time: One can't simply insert commands in the middle of the InputBox. I was trying to make the install process completely automated so anyone could do it, I just renamed the InputBox to "Hit ctrl+v then hit OK"

Thanks for your help

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