Jump to content

Faster then send()


Go to solution Solved by AndyG,

Recommended Posts

I created a billing notation program for work. The users click the text box on their web browser of choice. It runs fine, but I was presented with a "issue." When the user hits a hot key or a button, the program does a Send($Text) depending on variables builds the $Text. One of the Users noticed that if he takes the focus out of the text box then it still sends the rest of $Text but now its just in the web browser and it throws them to where ever. Can't help that, :ermm: what I was looking for, is there a way to get that $Text dumped in to the web text ox faster? I looked in to ControlSetText, the problem I have with that is, they could be running any web browser, and the title of the window varies for each technician's name... :thumbsdown:

I also found '?do=embed' frameborder='0' data-embedContent>>

Which looks like it could work, but I couldn't pull it off and I didn't want to revive a 5 or 6 year old thread. If the general consensus is the hotStrings is worth me trying to rewrite for this version of AutoIt then I'll certainly try, and IF it works I'd share. Alternatively if it boils down to, sorry you need to wait for the program to finish running, then they have to wait. I posted the code here '?do=embed' frameborder='0' data-embedContent>> If it helps...

Edited by JayHawkfl

Thanks for your time

 

Link to comment
Share on other sites

Hi,

You can target the window thanks to its class, take a look at the autoit3info tool.

Besides that, you can use the SendKeepActive function to avoid the user to focus another window while the text is sent.

Edit: You can also change the type speed with the Opt function (SendKeyDelay/SendKeyDownDelay).

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

Hi,

you could write the text into the clipboard (

_ClipBoard_SetData($text)

and simply

send("^v"); (ctrl-v)

to insert the text....

I'll give that a shot as soon as the phones slow down today XD

Thanks

 

use the _IE* functions...then you can have the browser visible, or not, and not worry about focus being removed from the browser, since it uses COM...also, it instantly sets text when you use the proper function.

of course, then you need to use IE

Would the program then only work for IE, or on any browser?

Thanks for your time

 

Link to comment
Share on other sites

ControlSend() would work.  I had the same problem with unique names on window titles.  An alternative would be to get the user's name sitting at the desktop from the environment variables.  It's how the program puts their name in anyway.

 

@UserName

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

ControlSend() would work.  I had the same problem with unique names on window titles.  An alternative would be to get the user's name sitting at the desktop from the environment variables.  It's how the program puts their name in anyway.

 

@UserName

I already have them entering their first name and last initial for the TimeStamp() function, I know there is a function that will do something like stringContains

So If I can get the first IDK 5 letters from the window, then compare it with the entered names in the .ini file, since its a small group that just might do it 

Thanks for your time

 

Link to comment
Share on other sites

  • 7 months later...

Hi,

you could write the text into the clipboard (

_ClipBoard_SetData($text)

and simply

send("^v"); (ctrl-v)

to insert the text....

Hate to necro a post, but I hate not giving credit where it's due more. This worked like a charm. Thank you :thumbsup:

Thanks for your time

 

Link to comment
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
 Share

  • Recently Browsing   0 members

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