
anzacfalcon
Active Members-
Posts
82 -
Joined
-
Last visited
Everything posted by anzacfalcon
-
I am working on a simple downloader tool. I have got a perfectly working old version. And a non-working properly newer version wich includes the new features i want to add to the old version. My main weakness here is the structure of the code. Please help me out by fixing the code and if possible commenting on it, thanks. Old Code: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> dim $DownloadProgress = 0 #Region ### START Koda GUI section ### Form=c:\documents and settings\haluk\desktop\form1_1.kxf $Form1_1 = GUICreate("Falcon Downloader V1 By Falcon", 429, 295, 281, 205) GUISetFont(20, 400, 0, "Arial") $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Haluk\Desktop\FD.jpg", 16, 8, 396, 100, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $Label2 = GUICtrlCreateLabel("Direct Download Link:", 65, 121, 306, 36) GUICtrlSetFont(-1, 22, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 11, 158, 401, 30) GUICtrlSetFont(-1, 14, 400, 0, "Arial") $Button1 = GUICtrlCreateButton("Download", 108, 244, 209, 41, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Arial") $Progress1 = GUICtrlCreateProgress(8, 200, 409, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $size = GUICtrlRead($Input1) $nMsg = GUIGetMsg() If $nMsg = -3 Then Exit If $nMsg = $Button1 Then $msgsize = InetGetSize($size) $filesize = $msgsize/2^10 $newfilesize = Round($msgsize/1048576, 1) $sizemsg = MsgBox(4 + 32, "Falcon Downloader", "The size of the file is " & $newfilesize & " Megabytes" & @CRLF & "Download the file?") If $sizemsg = 6 Then $var = StringSplit($size, "/") $newvar = $var[UBound($var) - 1] $filename = FileSaveDialog("Enter a filename and its appropiate file extension", @DesktopDir, "(*.*)", "", $newvar) InetGet($size, $filename, 0, 1) $DownloadProgress = 1 While $DownloadProgress = 1 While @InetGetActive $downloaded = @InetGetBytesRead/2^20 TrayTip("Downloading", $downloaded & " Megabytes downloaded", 10, 16) Sleep(1000) WEnd MsgBox(0, "Falcon Downloader", $newvar & " has finished downloading.") $DownloadProgress = 0 WEnd MsgBox(64, "Falcon Downloader", "Made By Falcon" & @CRLF & "www.se.curity.org") ElseIf $sizemsg = 7 Then MsgBox(64, "Falcon Downloader", "Made By Falcon" & @CRLF & "www.se.curity.org") EndIf EndIf WEnd New Code with features i want but not working. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Dim $DownloadProgress = 0 Dim $filesize Dim $KB = 2 ^ 10 Dim $MB = 2 ^ 20 Dim $GB = 2 ^ 30 #Region ### START Koda GUI section ### Form=c:\documents and settings\haluk\desktop\form1_1.kxf $Form1_1 = GUICreate("Falcon Downloader V1 By Falcon", 429, 295, 281, 205) GUISetFont(20, 400, 0, "Arial") $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\Haluk\Desktop\FD.jpg", 16, 8, 396, 100, BitOR($SS_NOTIFY, $WS_GROUP, $WS_CLIPSIBLINGS)) $Label2 = GUICtrlCreateLabel("Direct Download Link:", 65, 121, 306, 36) GUICtrlSetFont(-1, 22, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 11, 158, 401, 30) GUICtrlSetFont(-1, 14, 400, 0, "Arial") $Button1 = GUICtrlCreateButton("Download", 108, 244, 209, 41, $WS_GROUP) GUICtrlSetFont(-1, 24, 400, 0, "Arial") $Progress1 = GUICtrlCreateProgress(8, 200, 409, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $size = GUICtrlRead($Input1) $nMsg = GUIGetMsg() If $nMsg = -3 Then Exit If $nMsg = $Button1 Then $msgsize = InetGetSize($size) If $msgsize >= $KB Then $filesize = Round($msgsize / 2 ^ 10, 1) ElseIf $msgsize >= $MB Then $filesize = Round($msgsize / 2 ^ 20, 1) ElseIf $msgsize >= $GB Then $filesize = Round($msgsize / 2 ^ 30, 1) EndIf $sizemsg = MsgBox(4 + 32, "Falcon Downloader", "The size of the file is " & $filesize & " Megabytes" & @CRLF & "Download the file?") If $sizemsg = 6 Then $var = StringSplit($size, "/") $newvar = $var[UBound($var) - 1] $filename = FileSaveDialog("Enter a filename and its appropiate file extension", @DesktopDir, "(*.*)", "", $newvar) InetGet($size, $filename, 0, 1) $DownloadProgress = 1 While $DownloadProgress = 1 While @InetGetActive $downloaded = @InetGetBytesRead / 2 ^ 10 If @InetGetBytesRead >= $KB Then TrayTip("Downloading", $downloaded & " Kilobytes downloaded", 10, 16) ElseIf @InetGetBytesRead >= $MB Then Sleep(1000) $downloaded = @InetGetBytesRead / 2 ^ 20 TrayTip("Downloading", $downloaded & " Megabytes downloaded", 10, 16) Sleep(1000) ElseIf @InetGetBytesRead >= $GB Then $downloaded = @InetGetBytesRead / 2 ^ 30 TrayTip("Downloading", $downloaded & " Gigabytes downloaded", 10, 16) Sleep(1000) EndIf WEnd MsgBox(0, "Falcon Downloader", $newvar & " has finished downloading.") $DownloadProgress = 0 WEnd MsgBox(64, "Falcon Downloader", "Made By Falcon" & @CRLF & "www.se.curity.org") ElseIf $sizemsg = 7 Then MsgBox(64, "Falcon Downloader", "Made By Falcon" & @CRLF & "www.se.curity.org") EndIf EndIf WEnd
-
FileClose($FolderList) has to be FileClose($line)
-
InetGetSize in Megabytes
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Thank's. -
InetGetSize in Megabytes
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Thanks but can you use this in an example -
InetGetSize in "Bytes" isn't too user-friendly so whats the best way to convert the variable to megabytes. Also @InetGetBytesRead in megabytes.
-
Im not sure if this is appropiate but to further protect your compiled exe , you can code a "Crypter/Packer" with Anti's such as Anti Ollydbg. That is one of the most popular tools used by crackers. The best language for this would be VB6 or Delphi. If an MVP/Dev can approve me helping you with this then i wouldnt mind. Normally people abuse these tool's for what as we call "Making files FUD (Fully Undetectable)". The secondary purpose is to protect your exe. I hope this helped.
-
Getting Filename from a URL
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Thank's mate. Other suggestions are welcome. -
I have a userinput which contains a full URL. Want i want to do is extract the filename from the URL and use it for something else. I was thinking String Manipulation functions would be used unless anybody knows of a better way. For example, "www.example/com/files/test.exe". What i was thinking was to somehow get the string between the last occurrence of "/" from the right and the rest of the strings to the right of it. Thanks for listening.
-
Variable used before declare
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Now that im home, im working on my proper one. Thank's for teaching me how to do the progress system. I would of figured it out but it's always good to be sure. Kthnxbai. -
Variable used before declare
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Thank's. I also figured it out. The order of the If and ElseIf statements are very important. This was the reason why the variable want declared. While 1 $nMsg = GUIGetMsg() $file = GUICtrlRead ( $Input1 ) If $nMsg = $Button1 Then $filesize = InetGetSize ( $file ) $filemsg = MsgBox(4 + 32, "Alternative Downloader", "The size of the file is " & $filesize & " bytes" & @CRLF & "Are you sure you want to download it?") If $filemsg = 6 Then $filesave = FileSaveDialog("Please enter a filename and its appropiate file extension", @DesktopDir, "(*.*)", "") InetGet($file, $filesave) ElseIf $filemsg = 7 Then ContinueLoop EndIf EndIf If $nMsg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd This is the correct code. -
Variable used before declare
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Yep i think i understand, thank's. -
Variable used before declare
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
I dont think that's the problem becuase at home i didnt have any problems like this. -
I am currently at work and i was playing around with a tool i was making. When i compile and run i get a " Line -1: Error: Variable used without bieng declared." Here is the source: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 422, 194, 192, 114) $Label1 = GUICtrlCreateLabel("Alternative Downloader", 88, 8, 251, 31) GUICtrlSetFont(-1, 18, 400, 0, "Arial") $Input1 = GUICtrlCreateInput("", 8, 88, 401, 21) $Label2 = GUICtrlCreateLabel("Direct Download Link:", 120, 56, 187, 26) GUICtrlSetFont(-1, 14, 400, 0, "Arial") $Button1 = GUICtrlCreateButton("Download", 152, 144, 137, 33, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() If $nMsg = GUICtrlGetState($Button1) Then $filesize = InetGetSize($Input1) $filemsg = MsgBox(4 + 32, "Alternative Downloader", "The size of the file is " & $filesize & " bytes" & @CRLF & "Are you sure you want to download it?") ElseIf $filemsg = 6 Then $filesave = FileSaveDialog("Please enter a filename and its appropiate file extension", @DesktopDir, "(*.*)", "") InetGet($Input1, $filesave) ElseIf $filemsg = 7 Then ContinueLoop EndIf If $nMsg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd I cant seem to find the variable that is not declared.
-
What i said about the staff only applies to the first few people that posted a reply, so dont worry Melba, your on my good side. Also i didnt notice untill recently that a member of the dev team was kind enough to pm me there msn, if he can do it, then what's all the fuss about? Well dont judge a book by its cover, yes my avatar may seem a little fishy but that doesnt mean you should judge me from it. And about the DDoS i did say it was joke didnt i? If i ever did attemp to do anything i would do it the proper way. Seriously though, forget everything and compare my first post on this thread with the first few replies... Interestingly enough, the arguement started after my question was solved. I apologise for everything and we may continue normally now i hope. I appreciate everyone volunteering to help other members, maybe even ill help from now on. Btw Valik you rock!
-
Jos you do realise the reason i said "i can code myself thanks" was because of the level of anger i had at that time, what would you do if all the top dev's were making fun of you just for asking for a bit of help. I can be bothered using the forum's but at that time i was developing something that i felt like i needed to finish urgently and that was the only reason why i couldnt be bothered with the forums. But now that i have cooled down, i can be bothered posting for help. Maybe teach your staff to have a little more respect for people seeking help without knowing the reason behind it. You also stated that " anzacfalcon stated he/she/it can make the code without any support and thus has NO need to post in these forums anymore." This i just explained but you did state the possibility of me bieng a "it". Even younger ones can be more sensible than that. I hope i see better reply's from now on.
-
Yes it was a keylogger but i code other thing's aswell now so still thank you for your help Hawking.
-
For god sake... people have to F******* grow up!!! Maybe if you know how to read you can see the i later posted (CAPS FOR YOU PEOPLE TO SEE) "I ONLY WANTED TO ASK LITTLE QUESTIONS ONCE IN A WHILE NOT A FREE PRIVATE CODE". I can code myself thank's.
-
I hope a Modererator deletes this post before i start... I have more posts than you fubarable.
-
LoL relax im not one of them n00bs that post then dont reply seing no one gives a proper response, if i had your IP i would DDoS you but meh. Nah only joking. Hmm i was only asking for little questions once a while not a personal free coder lmaooooo! You guys make me laugh...
-
It was because you cannot write to a file with the attributes "Hidden" + "System". But you still helped me with your post Melba. Now instead of FileInstall("Setup.bat", $var[$i] & "\Setup.bat") $setup = FileOpen ( $var[$i] & "Setup.bat", 2 ) FileWrite ( $setup, "start /MAX " & $var[$i] ) FileSetAttrib($var[$i] & "\Setup.bat", "+HS") i can do FileWrite ( $var[$i] & \Setup.bat, "start /MAX" & $var[$i] ) FileSetAttrib($var[$i] & "\Setup.bat", "+HS") But my original method is more suitable so ill use that still even though it's great that i have learned there was another way to do it. Thanks.
-
Nothing your correct, this means im doing something wrong in my code. Thank's.
-
Hi i am trying to write to a batch file but i do not know if FileWrite supports .bat files. Does it? If not, how would i do this? Write to a text file then rename it from .txt to .bat?
-
DriveGetDrive( "REMOVABLE" ) Help
anzacfalcon replied to anzacfalcon's topic in AutoIt General Help and Support
Thnx so much guys, i really appreciate it!