Jump to content

CounterCraft

Members
  • Posts

    17
  • Joined

  • Last visited

Everything posted by CounterCraft

  1. #include <GUIConstants.au3> #include <IE.au3> Opt ("TrayIconHide", 1) $PanTask = _IECreateEmbedded() GUICreate("Weather Report", 800, 600) $PanGUI = GUICtrlCreateObj($PanTask, -62, -136, 1024, 1024) GUISetState() _IENavigate ($PanTask, "http://www.weather.com/outlook/health/allergies/hourbyhour/graph/11230?from=tenDay_topnav_undeclared", 0) While 1 $GUI = GUIGetMsg() Select Case $GUI = $GUI_EVENT_CLOSE Exit EndSelect WEnd you can edit GUICreate("Weather Report", 800, 600) to GUICreate("Weather Report", 600, 500) to get smaller box
  2. I did it for the lulz I'm amateur coder, so don't expect this as perfect (or optimized for performance) script. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> dim $filesize = 0 dim $filemsg = 0 dim $DownloadPath = "" dim $DownloadProgress = 0 #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Alternative Downloader", 422, 194, 192, 114) $Label1 = GUICtrlCreateLabel("Alternative Downloader", 88, 8, 251, 31) GUICtrlSetFont(-1, 18, 400, 0, "Arial") $DownloadLink = GUICtrlCreateInput("", 8, 88, 401, 21) $Label2 = GUICtrlCreateLabel("Direct Download Link:", 120, 56, 187, 26) GUICtrlSetFont(-1, 14, 400, 0, "Arial") $DownloadButton = GUICtrlCreateButton("Download", 152, 144, 137, 33, $WS_GROUP) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Select Case $nMsg = $DownloadButton $DownloadPath = GUICtrlRead ($DownloadLink) msgbox (1, $DownloadPath, $DownloadPath) $filesize = InetGetSize($DownloadPath) $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, "Executable (*.exe) | *.* (*.*)", 16, "") InetGet ($DownloadPath, $filesave, 0, 1) $DownloadProgress = 1 While $DownloadProgress = 1 While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16) Sleep(1000) Wend Msgbox (0, "Download is Complete", "Download is now complete.") $DownloadProgress = 0 WEnd EndIf Case $nMsg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
  3. put $filemsg=0 after koda script
  4. I want to know a way to revert back to normal once I close autoit script. Func hideFunc() If $isItHidden = 0 then $titleHide = WinGetTitle("", "") WinSetState($titleHide, "", @SW_HIDE) $isItHidden = 1 Elseif $isItHidden = 1 then WinSetState($titleHide, "", @SW_SHOW) $isItHidden = 0 EndIf EndFunc It works fine as it is, but my problems are 1. It won't hide admin-run program in vista 2. I don't know how to reveal program once it's hidden via external method (task manager, cmd command, etc)
  5. If I hide windows and close the program with @SW_Hide before reverting back to @SW_SHOW, how would I retrieve the window back? I've tried to retrieve firefox after doing @SW_HIDE through task manager but I could not. Also, how do I hide admin run program? I can't hide admin-run ventrilo or ccleaner. Do I have to give admin right for my script to do so? If then, how?
  6. I have this function where I need program to execute line when its before 4:00PM and after 9:00PM I get syntax error if I use or statement.... any idea? EDIT ok nvm I got it working Func ask4pass() while $limithour < 16 or $limithour > 21 $answer = inputbox ("Time Over", "Please type password or prepare to be shutdown", "", "*", "", "", "", "", 60) if $bypass = $answer then Exit Else shutdown (5) EndIf WEnd EndFunc
  7. what is @error use for? is it only file move that does not toggle @error or every other statement will be same as what novemeber posted? EDIT ok.... I guess file move doesn't set error automatically.... run("asdasdas") msgbox (0, "asd", @error) Success: The PID of the process that was launched. Failure: Returns 0 and sets @error to non-zero.
  8. (spoiler)I swear I recall something like this in other section of forum in this site... wonder what you can do to find that thread?(/spoiler) *walks away*
  9. hmm... moving into z: drive still shows 0 error code.... that is mystery
  10. $process = FileFindFirstFile("*.txt") If $process= -1 Then MsgBox(0, "Error", "No text files available") Exit EndIf While 1 $file = FileFindNextFile($process) If @error Then ExitLoop $name = InputBox("Enter filename","Enter filename or type exit to terminate the program") if $name = "exit" then Exit EndIf FileMove($file, $file & @YEAR & @MON & @MDAY, 9) MsgBox(0,"test", @error& " error code.") WEnd whatever you're doing.... destination information is incorrect.... $process = FileFindFirstFile("*.txt") If $process= -1 Then MsgBox(0, "Error", "No text files available") Exit EndIf While 1 $file = FileFindNextFile($process) If @error Then ExitLoop $name = InputBox("Enter filename","Enter filename or type exit to terminate the program") if $name = "exit" then Exit EndIf FileMove($file, "C:/", 9) MsgBox(0,"test", @error& " error code.") WEnd ^result was New Text document.txt20081120 New Text Document (2).txt2008112020081120 after two run \O_o/
  11. problem I see is that autoit can't locate this 2008 drive or folder you should use variable that represents new location and use date macro after-wise are you using this statement correctly? it should be
  12. filemove should be something like filemove ("c:/lol.exe", "c:/temp/lol.exe") if you want to make it complex then do filemove ($original, $newlocation) as for the rest... I'm still figuring out after I post this or someone who's better than be to post
  13. I have some programs and folder I want to open but don't want to put it on start up (everyone is sharing same account) I wanted to make certain way of starting those programs w/o going thru start menu trillian and aimp2 runs but I don't know how to open up folder Q_Q;
  14. Little more organized, but how do script distinguish between OK and Cancel button?
  15. It makes beep sound and popup notice every hour so I don't forget to light up the outdoor sign
  16. Hi everyone! programmer wannabe here... I made this script with basic knowledge to keep me alert. I think it's fine as it is but I want opinion from experienced scripters Is it necessary for me to put $min = @MIN and $sec = @SEC after while 1 = 1?
×
×
  • Create New...