Sendkey from Text field Data

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Locked
petski
Posts: 11
Joined: Tue Oct 25, 2011 7:15 pm

Sendkey from Text field Data

Post by petski »

Is there a way to pass Sendkeys to a action - trying to create a simple program where I can create simple sendkey scripts.
Type information into a TextBox to be saved and then played when button press

Example: Macro1 text field

Delay "5000"
SendKeys "" "whales{Tab}"
SendKeys "" "fish{Tab}"
SendKeys "" "[Address1]{Tab}"
Delay "10000"
SendKeys "" "{Tab}"
Delay "100"
SendKeys "" "{Tab}"
Delay "100"
SendKeys "" "{Tab}"
SendKeys "" "OHIO"
SendKeys "" "{Enter}

No need a way to call Macro one information - this can be modified or changed at any time
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Sendkey from Text field Data

Post by HPW »

You may have a look at hpwPlayAction-plugin:

Code: Select all

hpwPlayAction "[TextEntry1]" "0"
Alternativ in native nebook you could write the Actions to a Textfile in [PubDir] without any Extension.
Then use 'Call' with the filename as function Name.
This gives a compile error but will work on runtime.

Regards
Hans-Peter
petski
Posts: 11
Joined: Tue Oct 25, 2011 7:15 pm

Re: Sendkey from Text field Data

Post by petski »

I took your suggestion and downloaded hwpPlayAction and it works great and is exactly what needed. Thank you

Now I created a DataBase to hold a memo field to hold sendkey functions creating a script. And added a separate database to import data which can be sent from this tiny program

Simple example of script in DB text field displays "[SCRIPTSDB.SCRIPTSDB.SCRIPTCODE]" and my generic database pulling data from database }[SCRIPTSDB.DATA.FLD1] (CREATED 20 FIELDS...

Simple Action Call and it runs perfectly....

hpwPlayAction "[SCRIPTSD.SCRIPTSDB.SCRIPTCODE]" "0"

.*** Find and Replace Routine 1
Delay "1000"
SendKeys "" "{AltDn}ER"
SendKeys "" "bird{Tab}[SCRIPTSDB.DATA.FLD1]"
SendKeys "" "{Tab}{Tab}{Tab}{Tab}{Enter}{Esc}"

.*** Find and replace Routine 2
Delay "1000"
SendKeys "" "{AltDn}ER"
SendKeys "" "great{Tab}[SCRIPTSDB.DATA.FLD2]"
SendKeys "" "{Tab}{Tab}{Tab}{Tab}{Enter}{Esc}"

.*** Find and replace Routine 3
Delay "1000"
SendKeys "" "{AltDn}ER"
SendKeys "" "bad{Tab}[SCRIPTSDB.DATA.FLD3]"
SendKeys "" "{Tab}{Tab}{Tab}{Tab}{Enter}{Esc}"
Last edited by petski on Sat May 18, 2013 5:47 pm, edited 1 time in total.
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Sendkey from Text field Data

Post by dpayer »

HPW wrote:You may have a look at hpwPlayAction-plugin:

Code: Select all

hpwPlayAction "[TextEntry1]" "0"
Alternativ in native nebook you could write the Actions to a Textfile in [PubDir] without any Extension.
Then use 'Call' with the filename as function Name.
This gives a compile error but will work on runtime.

Regards

Hans-Peter,

Are you saying that any function that we may call via NB script inside an app, could be called using a file by the same name with the same content that is saved in the [pubdir] folder? This essentially would allow minor app updates via external function.

David P.
David Payer
Des Moines, Iowa
USA
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Sendkey from Text field Data

Post by HPW »

Yes, this is a undocumented feature from the old neobook days.
Hans-Peter
smokinbanger
Posts: 204
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

Re: Sendkey from Text field Data

Post by smokinbanger »

My speculation is that the external function file should NOT contain any actions from a plugin that isn't compiled in the exe. If the exe doesn't use that plugin it won't be compiled and calling the file will probably result in an error.
Just Sayin'...
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Sendkey from Text field Data

Post by HPW »

Yes, but as a author you have the control over it.
Even when your internal code does not reference a needed plugin, you put one of it's commands in a unused subroutine.
Then its gets packed/contained and is ready to use for Scripting.

Regards
Hans-Peter
smokinbanger
Posts: 204
Joined: Mon Jan 16, 2012 9:53 am
Location: United States

Re: Sendkey from Text field Data

Post by smokinbanger »

HPW wrote:...you put one of it's commands in a unused subroutine.
Then its gets packed/contained and is ready to use for Scripting.

Regards
That's a good idea! Just note that the compiled EXE will be larger, for those that are concerned about the size.
Just Sayin'...
petski
Posts: 11
Joined: Tue Oct 25, 2011 7:15 pm

Re: Sendkey from Text field Data

Post by petski »

I have posted my mini SendKeys Program for anyone who wishes to use, comment, etc
http://www.websitedesignsforless.com/SO ... riptor.zip


Thanks for all the help all
Locked