Sign in to follow this  
Followers 0
JayHawkfl

Faster then send()

7 posts in this topic

#1 ·  Posted (edited)

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

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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....

Share this post


Link to post
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

 

Share this post


Link to post
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

Share this post


Link to post
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

 

Share this post


Link to post
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....

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

 

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