Sign in to follow this  
Followers 0
baselsayeh

Fake msgbox Generator

4 posts in this topic

#1 ·  Posted (edited)

This is my first Autoit script

in first 5 text boxes type one of these

0 for default

http://www.autoitscript.com/autoit3/docs/functions/MsgBox.htm

in title text box type your title

in body text box type your massage

in timeout text box type after what of seconds to close msgbox

http://www.mediafire.com/?exwc9p7p455f46e

Edited by baselsayeh

Share this post


Link to post
Share on other sites



Why "fake"? The MsgBox it generates seems quite real.

Just curious.

Share this post


Link to post
Share on other sites

I thnk you ought to explain just exactly what you mean by the title.

Below is your code.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#RequireAdmin
#notrayicon
$filename = Random(1, 5001)
Opt("GUIOnEventMode", 0)
Local $msg
GUICreate("Form1",200,200,300,300)
GUICtrlCreateLabel("flag", 0, 0)
$1=GUICtrlCreateInput("0",30,0,30,20)
$2=GUICtrlCreateInput("0",60,0,30,20)
$3=GUICtrlCreateInput("0",90,0,30,20)
$4=GUICtrlCreateInput("0",120,0,30,20)
$5=GUICtrlCreateInput("0",150,0,30,20)
GUICtrlCreateLabel("_____________________________________", 0, 20)
GUICtrlCreateLabel("title", 0, 40)
$6=GUICtrlCreateInput("title",30,40,150,20)
GUICtrlCreateLabel("_____________________________________", 0, 60)
GUICtrlCreateLabel("body", 0, 85)
$7=GUICtrlCreateInput("body",30,85,150,20)
GUICtrlCreateLabel("_____________________________________", 0, 105)
GUICtrlCreateLabel("timeout", 0, 130)
$8=GUICtrlCreateInput("0",50,130,140,20)
GUICtrlCreateLabel("_____________________________________", 0, 150)
$9=GUICtrlCreateButton("Ok",75,165,50,30)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If $msg = $9 Then ExitLoop
WEnd
$flag1=ControlGetText("Form1","flag",4)
$flag2=ControlGetText("Form1","flag",5)
$flag3=ControlGetText("Form1","flag",6)
$flag4=ControlGetText("Form1","flag",7)
$flag5=ControlGetText("Form1","flag",8)
$title=ControlGetText("Form1","title",11)
$body=ControlGetText("Form1","body",14)
$timeout=ControlGetText("Form1","timeout",17)
GUIDelete()
Local $file = FileOpen($filename&".au3", 1)
If $file = -1 Then
MsgBox(0, "Error", "Unable to open file.")
Exit
EndIf
fileWrite($file, "#AutoIt3Wrapper_Add_Constants=y" & @CRLF)
fileWrite($file, "#notrayicon" & @CRLF)
FileWrite($file, "msgbox("&$flag1&"+"&$flag2&"+"&$flag3&"+"&$flag4&"+"&$flag5&","&'"'&$title&'"'&","&'"'&$body&'"'&","&$timeout&")")
FileClose($file)
msgbox(64," ","File saveed successfully",0)
msgbox(64," ","File mame: "&$filename&".au3",0)
Dim $yesno
$yesno = msgbox(4+32," ","Do you want convert "&$filename&".au3"&" file to exe?",0)
If $yesno = 6 then
    yes()
elseIf $yesno = 7 then
    MsgBox(64, "Exit", "Press Ok to continue")
Exit
endif
Func yes()
$yesno = msgbox(4+32," ","Do you want icon with exe?",0)
If $yesno = 6 then
    yesicon()
elseIf $yesno = 7 then
    noicon()
endif
EndFunc
Func yesicon()
msgbox(0+64," ","icon will be at au3icon.ico",0)
run('prog\Aut2Exe\Aut2exe.exe /in "'&$filename&'.au3" /out '&$filename&'".exe" /icon au3icon.ico /nopack')
$yesno = msgbox(4+32," ","Do you want compress exe?",0)
If $yesno = 6 then
upx()
elseIf $yesno = 7 then
    MsgBox(64, "Exit", "Press Ok to continue")
Exit
Endif
EndFunc
Func noicon()
run('prog\Aut2Exe\Aut2exe.exe /in "'&$filename&'.au3" /out '&$filename&'".exe" /nopack')
$yesno = msgbox(4+32," ","Do you want compress exe?",0)
if $yesno = 6 then
upx()
elseIf $yesno = 7 then
    MsgBox(64, "Exit", "Press Ok to continue")
Exit
Endif
EndFunc
Func upx()
$yesno = msgbox(4+32," ","Do you want to keep icon or not?",0)
if $yesno = 6 then
run('prog\Aut2Exe\Aut2exe.exe /in "'&$filename&'.au3" /out '&$filename&'".exe" /icon au3icon.ico /pack')
MsgBox(64, "", "Complted")
MsgBox(64, "Exit", "Press Ok to continue")
Exit
elseIf $yesno = 7 then
run('prog\Aut2Exe\Aut2exe.exe /in "'&$filename&'.au3" /out '&$filename&'".exe" /pack')
MsgBox(64, "", "Complted")
MsgBox(64, "Exit", "Press Ok to continue")
Exit
Endif
EndFunc

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

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