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 » Sun May 12, 2013 6:10 am

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 » Sun May 12, 2013 6:29 am

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 » Sun May 12, 2013 3:19 pm

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
Contact:

Re: Sendkey from Text field Data

Post by dpayer » Tue May 14, 2013 10:15 am

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 » Tue May 14, 2013 11:28 am

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 » Sat May 18, 2013 1:51 pm

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 » Sat May 18, 2013 9:51 pm

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 » Sun May 19, 2013 3:57 pm

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 » Thu May 23, 2013 7:04 am

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