MarioFernando Posted May 18, 2009 Share Posted May 18, 2009 Hi guyz; i have this crazy idea.... well it goes like this, when there is bear desktop(i mean where there is no windows are active, jst the desktop) then i whould type smthing through the keyboard(i should not be able to see what im typing in any interface) Ex:"Call me,Mario" then i will leave the computer.the text should be set in the "clipboard" or in a hidden .ini file! then when i come again and press a specific key(secret key) the text should get opened in notepad. Actually i want use this with my GF in a cyber cafe. I tried doing this with the use of _IsPressed function but it was a huge failer!!!! So i turned to the forum, please help me fellows. it whould be a great help. Link to comment Share on other sites More sharing options...
oMBRa Posted May 18, 2009 Share Posted May 18, 2009 look the example in the help file for ''_WinAPI_CallNextHookEx'' Link to comment Share on other sites More sharing options...
MarioFernando Posted May 30, 2009 Author Share Posted May 30, 2009 Dude i have to say that i really tried to do it by your suggestion.but i failled!!!!! man i need more help the example gives codes!!!! give me a start man!!! Link to comment Share on other sites More sharing options...
nf67 Posted May 30, 2009 Share Posted May 30, 2009 (edited) Modified the GUI of an old script to get this to work...___________________Hotkeys:/ = Show or hide GUI* = Turn On or Off [or use the button]- = Delete the message [or use the button]+ = Show the message (doesn't work yet)Esc = Exit___________________Only works with a-z (lower case), space and enter.expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $ShowHideToggle = 1 $GUI = GUICreate("GUI", 60, 25, 300, 300, $WS_POPUPWINDOW) $OnOffButton = GUICtrlCreateButton("ON", 0, 0, 30, 25) $ClearMsgButton= GuiCtrlCreateButton("C", 30, 0, 30, 25) GUISetState(@SW_SHOW) For $i = 65 To 90 HotKeySet(StringLower(Chr($i)), "MsgWrite") Next HotKeySet("{SPACE}", "MsgWrite") HotKeySet("{ENTER}", "MsgWrite") HotKeySet("{NUMPADMULT}", "OnOff") HotKeySet("{ESC}", "Quit") HotKeySet("{NUMPADADD}", "ShowMsg") ;Doesn't work, check out Func ShowMsg() HotKeySet("{NUMPADSUB}", "ClearMsg") HotKeySet("{NUMPADDIV}", "ShowHide") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OnOffButton OnOff() Case $ClearMsgButton ClearMsg() EndSwitch WEnd Func MsgWrite() Local $Key = @HotKeyPressed Switch $Key Case "{ENTER}" If GUICtrlRead($OnOffButton) = "ON" Then FileWrite(@ScriptDir & "\Message.txt", @CRLF) Case "{SPACE}" If GUICtrlRead($OnOffButton) = "ON" Then FileWrite(@ScriptDir & "\Message.txt", " ") Case Else If GUICtrlRead($OnOffButton) = "ON" Then FileWrite(@ScriptDir & "\Message.txt", $Key) EndSwitch HotKeySet($Key) Send($Key) HotKeySet($Key, "MsgWrite") EndFunc Func OnOff() If GUICtrlRead($OnOffButton) = "ON" Then GUICtrlSetData($OnOffButton, "OFF") Else GUICtrlSetData( $OnOffButton, "ON") EndIf EndFunc Func ClearMsg() $FILEDELETE=FileDelete(@ScriptDir & "\Message.txt") if $FILEDELETE=0 Then MsgBox( 0, "Error", "Sorry, can't find a message to delete!") EndFunc Func Quit() Exit EndFunc Func ShowMsg() ShellExecute(@ScriptDir & "\Message.txt") EndFunc Func ShowHide() If $ShowHideToggle = 1 Then GUISetState(@SW_HIDE) $ShowHideToggle = 0 Else GUISetState(@SW_SHOW) $ShowHideToggle = 1 EndIf EndFuncThis basically puts every lower case letter, space and enter in a .txt file called Message.txt (in the script directory) if it's turned on.It's just writing something without an open file, and once you press + it will show what you typed. Afterwards, you can delete the message (file) by pressing -. Edited May 30, 2009 by nf67 Link to comment Share on other sites More sharing options...
nguyenbason Posted May 30, 2009 Share Posted May 30, 2009 Func ShowMsg() ShellExecute(@ScriptDir & "\Message.txt") EndFunc UnderWorldVN- Just play the way you like it Link to comment Share on other sites More sharing options...
nf67 Posted May 30, 2009 Share Posted May 30, 2009 Func ShowMsg() ShellExecute(@ScriptDir & "\Message.txt")EndFunc Edited Link to comment Share on other sites More sharing options...
MarioFernando Posted June 4, 2009 Author Share Posted June 4, 2009 thanx man.ill try this out and give you details!!! your great!!! Link to comment Share on other sites More sharing options...
MarioFernando Posted June 19, 2009 Author Share Posted June 19, 2009 Modified the GUI of an old script to get this to work... ___________________ Hotkeys: / = Show or hide GUI * = Turn On or Off [or use the button] - = Delete the message [or use the button] + = Show the message (doesn't work yet) Esc = Exit ___________________ Only works with a-z (lower case), space and enter. expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $ShowHideToggle = 1 $GUI = GUICreate("GUI", 60, 25, 300, 300, $WS_POPUPWINDOW) $OnOffButton = GUICtrlCreateButton("ON", 0, 0, 30, 25) $ClearMsgButton= GuiCtrlCreateButton("C", 30, 0, 30, 25) GUISetState(@SW_SHOW) For $i = 65 To 90 HotKeySet(StringLower(Chr($i)), "MsgWrite") Next HotKeySet("{SPACE}", "MsgWrite") HotKeySet("{ENTER}", "MsgWrite") HotKeySet("{NUMPADMULT}", "OnOff") HotKeySet("{ESC}", "Quit") HotKeySet("{NUMPADADD}", "ShowMsg") ;Doesn't work, check out Func ShowMsg() HotKeySet("{NUMPADSUB}", "ClearMsg") HotKeySet("{NUMPADDIV}", "ShowHide") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OnOffButton OnOff() Case $ClearMsgButton ClearMsg() EndSwitch WEnd Func MsgWrite() Local $Key = @HotKeyPressed Switch $Key Case "{ENTER}" If GUICtrlRead($OnOffButton) = "ON" Then FileWrite(@ScriptDir & "\Message.txt", @CRLF) Case "{SPACE}" If GUICtrlRead($OnOffButton) = "ON" Then FileWrite(@ScriptDir & "\Message.txt", " ") Case Else If GUICtrlRead($OnOffButton) = "ON" Then FileWrite(@ScriptDir & "\Message.txt", $Key) EndSwitch HotKeySet($Key) Send($Key) HotKeySet($Key, "MsgWrite") EndFunc Func OnOff() If GUICtrlRead($OnOffButton) = "ON" Then GUICtrlSetData($OnOffButton, "OFF") Else GUICtrlSetData( $OnOffButton, "ON") EndIf EndFunc Func ClearMsg() $FILEDELETE=FileDelete(@ScriptDir & "\Message.txt") if $FILEDELETE=0 Then MsgBox( 0, "Error", "Sorry, can't find a message to delete!") EndFunc Func Quit() Exit EndFunc Func ShowMsg() ShellExecute(@ScriptDir & "\Message.txt") EndFunc Func ShowHide() If $ShowHideToggle = 1 Then GUISetState(@SW_HIDE) $ShowHideToggle = 0 Else GUISetState(@SW_SHOW) $ShowHideToggle = 1 EndIf EndFunc This basically puts every lower case letter, space and enter in a .txt file called Message.txt (in the script directory) if it's turned on. It's just writing something without an open file, and once you press + it will show what you typed. Afterwards, you can delete the message (file) by pressing -. bro that script totally works!!! great stuff. hey can you modify this so that i can type numbers through the numberpad? just qurious... If you can thta will be totally helpful.. i really have to thank all of you guyz once again!! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now