Sign in to follow this  
Followers 0
MarioFernando

Writing on desktop to leave short notes!

8 posts in this topic

Hi guyz;

i have this crazy idea.... :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) :party: 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.

Share this post


Link to post
Share on other sites



look the example in the help file for ''_WinAPI_CallNextHookEx''

Share this post


Link to post
Share on other sites

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!!!

Share this post


Link to post
Share on other sites

#4 ·  Posted (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.

#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 -.

Edited by nf67

Share this post


Link to post
Share on other sites

Func ShowMsg()

ShellExecute(@ScriptDir & "\Message.txt")

EndFunc


UnderWorldVN- Just play the way you like it

Share this post


Link to post
Share on other sites

Func ShowMsg()

ShellExecute(@ScriptDir & "\Message.txt")

EndFunc

:) Edited

Share this post


Link to post
Share on other sites

thanx man.ill try this out and give you details!!!

your great!!! :D

Share this post


Link to post
Share on other sites

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.

#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!!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0