Jump to content

Writing on desktop to leave short notes!


Recommended Posts

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.

Link to comment
Share on other sites

  • 2 weeks later...

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
Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...