English
Forum

Hotkeys across programs?

 
good day!

i'm great friend the Programmiersprachen XProfan as well as Autohotkey (AHK).
Letztens has me The question set, whether not too in XProfan one commands integrate is, with the one Hotkeys across programs occupy can (like in AHK, where z.B. #n::Run Notepad  the Notepad launch or Hello::Tschüss  the word "Hallo" complete across programs by the word "Tschüss" supplant).
gives it there one XProfanes Äquivalent? unless too tricky, gladly too a similar function from the Windows API

already time many Thanks in the Vorraus,
Vincent.
 
01/22/11  
 



i don't know very what You want but vlt. mean You something like:
CompileMarkSeparation
cls

while 1

    if iskey(123)

        while iskey(123)

        wend

        sendString(0,"Hallo Welt")

    endif

01/22/11  
 



Yes, the comes the whole thing already very near, many Thanks
what though must I do, if I in example whole Wörter supplant would like? D.h., if I certain lines or in irgendeinem anderem Program one "Hallo Welt" not one F12, sindern with the input one whole Wortes provoke would like?

means if I in example the word "Klaus" eingebe and would like, that this word then through "Hallo Welt" supplant becomes?
means the instead of the Wortes "Klaus" then "Hallo Welt" appear or. transfer becomes?
 
01/22/11  
 



this is too no trouble, I have you this time one Konstrukt aufbereitet.

You must for but heavy his ^^ -

You must in your IDE XPSE  [...]  as Compiler indicate the whom code something prepared and then on XProfan weitergibt:
CompileMarkSeparation
 {$cleq}
cls
userMessages wm_user+1234
initMyHook()
var try$=""
var myListFrom&=create("list",0)
var myListTo&=create("list",0)
addString(myListFrom&,"HALLO WELT")
addString(myListTo&,"Klaus")
addString(myListFrom&,"KLARO")
addString(myListTo&,"Prima!")

while 1

    waitInput

    select uMessage

        caseof wm_user+1234

        if &ulParam=128

            ifnot &uwParam=160

                if ((&uwParam>64) and (&uwParam<91)) or (&uwParam=32)

                    try$=try$+chr$(&uwParam)
                    case ord(try$)=32 : try$=del$(try$,1,1)
                    case right$(try$,2)="  " : try$=del$(try$,len(try$),1)

                    if len(try$)

                        if getString$(myListFrom&,selectString(myListFrom&,-1,try$))=try$

                            whileLoop len(getString$(myListFrom&,getCurSel(myListFrom&)))

                                sendKey(0,vk_back)

                            wend

                            sendString(0,getString$(myListTo&,getCurSel(myListFrom&)))
                            try$=""

                        endif

                    endif

                else

                    try$=""

                endif

            endif

        endif

    endSelect

wend

nProc initMyHook

    return SetWindowsHookEx(13,procAddr(myLowLevelKeyboardHookProc),getModuleHandle(0),0)/*WH_KEYBOARD_LL*/

endProc

nProc myLowLevelKeyboardHookProc

    parameters code&,wParam&,lParam&
    sendMessage(hWnd,wm_user+1234,long(lParam&,0),long(lParam&,8))
    return 0

=s4 href='./../../Function-References/XProfan/endproc/'>endProc


here becomes one LowLevel-Keyboard-Hook injiziert -

if you somewhere "HALLO WELT" type then becomes "Klaus" eingefügt or. from "KLARO" becomes "lovely!".

hardly tested hingewürfelt but it working by me Schonmal...

circa your XProfan XPSE-Fit To make simply xpse.exe, jwasm.exe and polink.exe of  [...]  herunterladen and in that XProfan-directory copy and the IDE with Compiler The xpse.exe indicate.

1.206 kB
Hochgeladen:01/22/11
Downloadcounter123
Download
 
01/22/11  
 



Yes super, many Thanks! Look me the tommorrow time accurate on
 
01/22/11  
 



gladly happen - found so did i even interestingly.
 
01/22/11  
 



so, Have the whole time tested, functions everything super, many Thanks again!
Allerings is me noticed, that particularly the first example awfully plenty CPU-performance uses. have time one Waitinput complement - then went of course The CPU-Auslastung down, the program reacted then but only yet the isKey, if the XProfan-Window too really open was, not, if it z.B. minimizes watts.
Gibt's as a ploy, The CPU-Auslastung possible far under To hold?
 
01/23/11  
 



the 2. example uses 0% CPU, the 1. example against it in the principle "100%".

These Variante might too "nichts" verbrauchen:
CompileMarkSeparation
 {$cleq}
cls

while 1

    sleep 100

    if getAsyncKeyState(123)

        while getAsyncKeyState(123)

            sleep 50

        wend

        sendString(0,"Hallo Welt")

    endif

wend

 
01/23/11  
 




Jörg
Sellmeyer
probably reicht even one Sleep 1. ex XProfan 11 goes too "WaitInput 1".
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
01/23/11  
 



Thanks getAsyncKeyState wealthy 10 Überprüfungen per second and 1000 (theoretical) Überprüfungen per second make imho none sense. ^^

with WaitInput 1 would I me not at all so sure... means obs still so working.
 
01/23/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.368 Views

Untitledvor 0 min.
Michael Klumb03/08/16
iF09/02/15
Andreas Koch04/12/12
Frank Vorholzer01/08/12
More...

Themeninformationen

this Topic has 3 subscriber:

iF (5x)
unbekannt (4x)
Jörg Sellmeyer (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie