Source language: Translate to:

hpwSendkeys - reposted

Questions about NeoBook PlugIns

Moderator: Neosoft Support

Interesting!!!!!!!!!

Postby Dorjee » Fri Jan 01, 2010 5:22 am

A very good progress! Thanks!

Could you give some illustrated examples. That means to give formula and the result to facilitate the understanding. By example, what are the formula for:

« : formula
» : formula
é : formula
è : formula
ü : formula

etc. I think with a dozen of examples everybody can understand the principle.
Dorjee the Neobooker
Dorjee
 
Posts: 27
Joined: Thu Nov 17, 2005 12:15 am

Some trying

Postby Dorjee » Fri Jan 01, 2010 10:00 am

Well, some precisions to help. I am using hpwSendKeys to simulate a little text editor and send some charaters in a text box.

Easy and obvious codes for dummies:

Code: Select all
hpwSendKeysToTitle "yourtitle" "ü" => ü
hpwSendKeysToTitle "yourtitle" "û" => û
hpwSendKeysToTitle "yourtitle" "é" => é
hpwSendKeysToTitle "yourtitle" "è" => è
hpwSendKeysToTitle "yourtitle" "ê" => ê
hpwSendKeysToTitle "yourtitle" "à" => à
etc.


And even, the same method for: # € | \ @ *

But it doesn't work for: ~

I didn't find yet a method to produce the French quote « and » (ascii code respectively 171 and 187). The key action are:

Alt+0171 (+ means Alt down when typing the numbers) => «
Alt+0187 => »

I tried this:

Code: Select all
hpwSendKeysToTitle "yourtitle" "%(0171)" => gives nothing except a system error beep


Every use of % character, attributed to Alt key, gives an error beep and nothing else. How to use Alt key with hpwSendKeys to send some extended characters in a text box? Help!
Dorjee the Neobooker
Dorjee
 
Posts: 27
Joined: Thu Nov 17, 2005 12:15 am

Postby HPW » Fri Jan 01, 2010 10:39 am

But it doesn't work for: ~


Since it is documented that the ~ is a special key for [ENTER] you have to use {~} to get it send nativly.

Every use of % character, attributed to Alt key, gives an error beep and nothing else. How to use Alt key with hpwSendKeys to send some extended characters in a text box? Help!


When I use %D or %B to send it to my texteditor-window it open there the Mainmenu 'Datei' (German for file) or 'Bearbeiten' (German for Edit).
So the ALT-Key gets presses with a shortcut letter for a mainmenu-entry.

As a workaround you may use the clipboard for inserting your special keys:
Code: Select all
SetVar "[Clipboard]" "[#171]"
hpwSendKeysToHandle "[MyWinHandle]" "^v"
Delay "10"
SetVar "[Clipboard]" "[#187]"
hpwSendKeysToHandle "[MyWinHandle]" "^v"
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Amazing!

Postby Dorjee » Fri Jan 01, 2010 2:03 pm

Wooa! What a method, and it works! Passing through the clipboard!

I show here a less elegant method I tried:

Code: Select all
hpwSendKeysToTitle "yourtitle" "µ"
StrReplace "[TextBox1]" "µ" "«" "[TextBox1]" ""


The hpwSendKeys send an unlikely character (I choose µ), and immediately it is replaced (StrReplace) with the desired character. The inconvenient of this method is that it is applicable only in one textbox ([TextBox1] in the example) of the application. Conversely the clipboard method can be applied in any selected textbox. Conclusion the clipboard method is the best!

The generalization gives this:

Code: Select all
SetVar "[Clipboard]" "[#ASCII-CODE]"
hpwSendKeysToTitle "yourtitle" "^v"


Replace ASCII-CODE by any number to display the wanted character. For example: 208 for Ð, 255 for ÿ. But it is not possible to go beyond 255 :( . (Another trick from Hans-Peter?).
Dorjee the Neobooker
Dorjee
 
Posts: 27
Joined: Thu Nov 17, 2005 12:15 am

Postby HPW » Fri Jan 01, 2010 3:24 pm

But it is not possible to go beyond 255


Yes, going beyond 255 will need a new neobook version and new plugins with unicode-support.
Maybe future versions of neobook will support this.
:wink:
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sun Jan 03, 2010 7:16 am

Just released hpwSendkeys 1.21

http://www.hpwsoft.de/anmeldung/html1/n ... book2.html

Lib from hpwSendKeys32 intergrated in hpwSendKeys so both modes can used at runtime

Variable [hpwSendKeysMode32] set to "1" switches to hpwSendKeys32 lib.

Variable [hpwSendKeys32Wait] set to "1" enables the wait mode between sended keys.
(Waitmode was enabled by default before)


This makes the seperate hpwSendKeys32 obsolet.
If it is no problem for anyone it will be abandoned.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby smartmedia » Mon Mar 29, 2010 3:00 am

Hi..

Hans, i am trying to download the latest version but when i hit the link on you Page, the right part of the Browser becomes white and nothing happens.
Can you check it please...

Thanks
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby HPW » Mon Mar 29, 2010 3:17 am

From time to time someone attacks my download counter PHP-script and destroy the config-textfile.
I have not find out the way they do it.
:(
I have to restore the file when I am back home.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Mon Mar 29, 2010 4:21 am

Should work now again.
:wink:
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby smartmedia » Mon Mar 29, 2010 4:31 am

Hi..

Works fine, Thanks Hans..
User avatar
smartmedia
 
Posts: 889
Joined: Fri Apr 01, 2005 6:50 am
Location: Hellas

Postby HPW » Sat Mar 17, 2012 3:18 am

Just released hpwSendkeys 1.22

http://www.hpwsoft.de/anmeldung/html1/n ... book2.html

Action: hpwFocusWindow - Sets the focus to a window by its handle.
Action: hpwClickMouse - Simulates mouseclick at screen-position X/Y. Left/Middle/Right/Double supported.
Action: hpwSetMousePos - Set mousecursor to screen-position X/Y.
Action: hpwGetMousePos - Get mousecursor posx and posy from screen-position X/Y.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby HPW » Sun Mar 18, 2012 1:45 am

Just released hpwSendkeys 1.23

http://www.hpwsoft.de/anmeldung/html1/n ... book2.html

Action: hpwGetWindowRect - Get the rectange of a window from its handle.

hpwGetWindowRect is identical to hpwGetObjRect from hpwUtility.
But I find it usefull to have it in hpwSendkeys for smaller automation tasks without the need of bigger hpwUtility.

hpwClickMouse vs neobook ClickMouse:

hpwClickMouse supports all mouse-buttons and has its own click-coordinates.
It stores the current mouse pos internaly and restore it after the click at the wanted position.

hpwSetMousePos vs neobook SetMousePos:

hpwSetMousePos only sets it fast to the new location.
It does not move it visualy from current to new location.
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Re: hpwSendkeys - reposted

Postby HPW » Sat Jun 04, 2016 8:07 am

Just released hpwSendkeys 1.24

http://www.hpwsoft.de/anmeldung/html1/n ... book2.html

BugFix: hpwGetProcessList - Returns now 'No filepath' when API-call GetModuleFileNameEx returns an error for a process-id

Regards
Hans-Peter
User avatar
HPW
 
Posts: 2520
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Previous

Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 3 guests