Jump to content

syberschmo

Active Members
  • Posts

    39
  • Joined

  • Last visited

syberschmo's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Has anyone come up with a solution to this? Do Graphics controls just not support $GUI_HIDE? I haven't played with AutoIt for a long time, so pardon me if this is a stupid question.
  2. Thanks for the feedback. I used to declare the globals outside the function, but I thought it looked too sloppy. I'll change it to what you suggested.
  3. Hi I saw some gradient-related posts recently and I though I should share my little contribution. It's poorly coded but will work. ;=============================================================================== ; ; Description: Functions to create/update gradient-filled, colored progress ; bar. ; ; Syntax: ; _GProgressOn($sTitle, $hxStartColor, $hxEndColor, ; $sMainText = "Progress Bar", $sSubText = "", ; $iXpos = "", $iYpos = "", $iOntop = 0) ; ; _GProgressSet($iProgress, $sMainText = "", $sSubText = "") ; ; _GProgressOff() ; ; _GUICtrlCreateGProgress($hxStartColor, $hxEndColor, $iXpos, ; $iYpos, $iWidth, $iHeight) ; ; _GuiCtrlSetGProgress($gBar, $sWindowTitle, $iProgress) ;===============================================================================oÝ÷ ØÃE8H4"ÔAH,A1jjezÆ®¶­sb6æ6ÇVFRgV÷C¶w&Eö&'2æS2gV÷C° ¢7&VvöâUÕÄU0 £´UÕÄR¢w&FVçB&öw&W74öâWׯP¥ôu&öw&W74öâgV÷Cµôu&öw&W74öâWׯRgV÷C²ÂsdTSÂ3dTRÂgV÷C´ÖâFWBgV÷C²ÂgV÷Cµ7V%FWBgV÷C²¤f÷"b33c·ÒFò7FW ôu&öw&W756WBb33c·ÂgV÷C´ÖâFWBWW&RgV÷C²ÂgV÷Cµ7V"FWBF÷vâW&S¢gV÷C²fײb33c·fײgV÷C²RgV÷C² 6ÆVWsR¤æW@¤×6t&÷CÂgV÷C´FöæRb333²gV÷C²ÂgV÷C´FöæRb333²gV÷C²¥ôu&öw&W74öfb £´UÕÄR#¢w&FVçBuT7G&Ä7&VFU&öw&W72WׯP¢b33c·5væF÷uFFÆRÒgV÷CµôwV7G&Ä7&VFTu&öw&W72WׯRgV÷C°¢b33c¶f÷&ÓÒuT7&VFRb33c·5væF÷uFFÆRÂ##ÂsR¢b33c¶v&"ÒôuT7G&Ä7&VFTu&öw&W72sdTSÂ3dTRÂÂÂ#ÂC¤uT6WE7FFR ¤f÷"b33c·ÒFò ôwV7G&Å6WDu&öw&W72b33c¶v&"Âb33c·5væF÷uFFÆRÂb33c· 6ÆVWsR¤æW@¤×6t&÷CÂgV÷C´FöæRb333²gV÷C²ÂgV÷C´FöæRb333²gV÷C² ¢6VæG&Vvöà _GProgressOn: _GuiCtrlCreateGProgress: Note: Use only one bar at a time. Thanks to cyberslug for the gradient code from an old post. UPDATE: Changed variable declarations. Thanks RazerM. Also, I forgot to mention that the bars DO NOT FLICKER as they update! Try it out. grad_bars.au3
  4. Hi Dale I figured it out! A line in the HTML form is messing everything up: <input type="hidden" name="item" value="0000"> Is item a reserved word? I looked into IE.au3 (specifically _IEFormElementGetCollection) and found this line (line 1316): Return $o_object.elements.item ($i_index)oÝ÷ Ùhbr¬ºÇ¶Þ¶êçjÊ^r'ârãyËpéÈZ+I^éíëB¢Y^rب+jY^w­©â×±N¬{ej)ì«·r¶¬ë0éÜjYb®¶­seôTf÷&ÔVÆVÖVçDvWD6öÆÆV7Föâb33c¶ôf÷&ÒÂRoÝ÷ ØèºwmçèZ0x0¢¹®§uû¥Êy«­¢+Ø¥¹±Õ±Ðí%¹ÔÌÐì)}%ÉɽÉ!¹±ÉI¥ÍÑÈ ¤((í]I%Q= U59P(ÀÌØí½%ô}% ÉÑ ¤(ÀÌØí͡ѵ°ôÅÕ½Ðì±Ðí¡Ñµ°Ðì±Ðí¡Ðì±ÐíѥѱÐíͱÐì½Ñ¥Ñ±Ðì±Ð콡Ðì±Ðí½äÐì±Ðí½É´Ñ¥½¸ôÅÕ½ÐìÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹ½½±¹½´¼ÅÕ½ÐìÅÕ½ÐìµÑ¡½ôÅÕ½ÐìÅÕ½ÐíÁ½ÍÐÅÕ½ÐìÅÕ½ÐìÐìÅÕ½Ðì(ÀÌØí͡ѵ°µÀìôÅÕ½Ðì±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐìÅÕ½Ðí¡¥¸ÅÕ½ÐìÅÕ½Ðì¹µôÅÕ½ÐìÅÕ½Ðí%MA% ½µµ¹ÅÕ½ÐìÅÕ½ÐìÙ±ÕôÅÕ½ÐìÅÕ½Ðí%ÑµÍ åM±±ÉMÉ ÅÕ½ÐìÅÕ½ÐìÐì±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐìÅÕ½Ðí¡¥¸ÅÕ½ÐìÅÕ½Ðì¹µôÅÕ½ÐìÅÕ½Ðí¥Ñ´ÅÕ½ÐìÅÕ½ÐìÙ±ÕôÅÕ½ÐìÅÕ½ÐìÀÀÀÀÅÕ½ÐìÅÕ½ÐìÐìÅÕ½Ðì(ÀÌØí͡ѵ°µÀìôÅÕ½Ðì±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐìÅÕ½Ðí¡¥¸ÅÕ½ÐìÅÕ½Ðì¹µôÅÕ½ÐìÅÕ½ÐíUÍɹµÅÕ½ÐìÅÕ½ÐìÙ±ÕôÅÕ½ÐìÅÕ½ÐíÑÍÐÅÕ½ÐìÅÕ½ÐìÐì±ÐíÐíIÁ½ÉÐè±Ðì½Ðì±ÐíÈÐì±Ðíѱ½ÉÈôÅÕ½ÐìÅÕ½ÐìÀÅÕ½ÐìÅÕ½Ðì±±ÍÁ¥¹ôÅÕ½ÐìÅÕ½ÐìÀÅÕ½ÐìÅÕ½Ðì±±Á¥¹ôÅÕ½ÐìÅÕ½ÐìÀÅÕ½ÐìÅÕ½ÐìÐìÅÕ½Ðì(ÀÌØí͡ѵ°µÀìôÅÕ½Ðì±ÐíÑÈÐì±ÐíÑÐì±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐìÅÕ½ÐíÉ¥¼ÅÕ½ÐìÅÕ½Ðì¹µôÅÕ½ÐìÅÕ½Ðí¥Í IPÅÕ½ÐìÅÕ½ÐìÙ±ÕôÅÕ½ÐìÅÕ½ÐìÀÅÕ½ÐìÅÕ½ÐìÐíQ¡¥Ì±¥ÍÑ¥¹±Ðì½ÑÐì±Ðì½ÑÈÐìÅÕ½Ðì(ÀÌØí͡ѵ°µÀìôÅÕ½Ðì±ÐíÑÈÐì±ÐíÑÐì±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐìÅÕ½ÐíÉ¥¼ÅÕ½ÐìÅÕ½Ðì¹µôÅÕ½ÐìÅÕ½Ðí¥Í IPÅÕ½ÐìÅÕ½ÐìÙ±ÕôÅÕ½ÐìÅÕ½ÐìÄÅÕ½ÐìÅÕ½Ðì¡­Ðí5ձѥÁ±±¥ÍÑ¥¹Ì±Ðì½ÑÐì±Ðì½ÑÈÐìÅÕ½Ðì(ÀÌØí͡ѵ°µÀìôÅÕ½Ðì±ÐíÑÈÐì±ÐíÑÐì±ÐíÍÁ¸±ÍÌôÅÕ½ÐìÅÕ½Ðí¡±ÀÅÕ½ÐìÅÕ½ÐìÐìe½ÔÝ¥±°±Ñ¼Ù¥Ü±°±¥ÍÑ¥¹Ì½ÉÑ­¥¹Ñ¥½¸±Ðì½ÍÁ¸Ðì±Ðì½ÑÐì±Ðì½ÑÈÐì±Ðì½Ñ±ÐìÅÕ½Ðì(ÀÌØí͡ѵ°µÀìôÅÕ½Ðì±ÐíÈÐì±Ðí¥¹ÁÕÐÑåÁôÅÕ½ÐìÅÕ½ÐíÍÕµ¥ÐÅÕ½ÐìÅÕ½ÐìÙ±ÕôÅÕ½ÐìÅÕ½Ðí ½¹Ñ¥¹ÕÐìÅÕ½ÐìÅÕ½ÐìÐì±Ð콽ɴÐì±Ðì½½äÐì±Ð콡ѵ°ÐìÅÕ½Ðì)}%½]É¥Ñ!Q50 ÀÌØí½%°ÀÌØí͡ѵ°¤)}%Ñ¥½¸ ÀÌØí½%°ÅÕ½ÐíÉÉÍ ÅÕ½Ðì¤((íM1 PI% Just remember if anyone is trying to submit a form with an input named 'item', you will probably not be able to use _IEFormElementGetCollection with an index value. Instead, you should use _IEFormElementGetCollection to return an array and then define the form element explicitly in your code. Happy coding!
  5. I played with the radio select stuff but the error still occurs even with it removed. Here is a full reproducer, as requested: #include <IE.au3> _IEErrorHandlerRegister() ;WRITE DOCUMENT $oIE = _IECreate() $shtml = "<html><head><title>asd</title></head><body><form action=""http://www.google.com/"" method=""post"">" $shtml &= "<input type=""hidden"" name=""ISAPICommand"" value=""ItemsBySellerSearch""><input type=""hidden"" name=""item"" value=""0000"">" $shtml &= "<input type=""hidden"" name=""Username"" value=""test""><b>Report:</b><br><table border=""0"" cellspacing=""0"" cellpadding=""0"">" $shtml &= "<tr><td><input type=""radio"" name=""isBRT"" value=""0"">This listing</td></tr>" $shtml &= "<tr><td><input type=""radio"" name=""isBRT"" value=""1"" checked>Multiple listings</td></tr>" $shtml &= "<tr><td><span class=""help""> You will be able to view all listings before taking action</span></td></tr></table>" $shtml &= "<br><input type=""submit"" value=""Continue >""></form></body></html>" _IEDocWriteHTML($oIE, $shtml) _IEAction($oIE, "refresh") ;SELECT RADIO AND SUBMIT FORM $oForm = _IEFormGetCollection($oIE, 0) _IEFormElementRadioSelect($oForm, "0", "isBRT", 1, "byValue", 0) $oBtn = _IEFormElementGetCollection($oForm, 5) _IEAction($oBtn, "click") _IELoadWait($oIE) Same error, occuring because of the _IEFormElementGetCollection method: Any help would be much much appreciated - I've been struggling with this for a lonnng time Thanks for all the help so far, Dale.
  6. Ok, I changed the code to $oForm = _IEFormGetCollection($oIE, 2) _IEFormElementRadioSelect($oForm, "0", "isBRT") $oBtn = _IEFormElementGetCollection($oForm) ConsoleWrite("Num Elements: " & @extended) ;_IEAction($oBtn, "click") ;_IELoadWait($oIE) And console write returns: But when I use $oBtn = _IEFormElementGetCollection($oForm, 5)with the same code, Autoit crashes with error: --> COM Error Encountered in Action.au3 ----> $IEComErrorScriptline = 1316 ----> $IEComErrorNumberHex = 80020003 ----> $IEComErrorNumber = -2147352573 ----> $IEComErrorWinDescription = Member not found. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = ----> $IEComErrorLastDllError = 0 I understand that IE.au3 uses a zero-based index, and specifying '5' as an index when there are six items should work, right? Thanks in advance, again.
  7. To access unnamed forms, try _IEFormGetCollection using an index number to specify the form that you'd like to use. The index is zero-based. To access the elements within a form, try _IEFormElementGetCollection with an index number to specify the element that you'd like to use. The index is zero-based. All of that stuff is in the autoit helpfile under User Defined Functions // IE Management If you just want to use the old syntax, I think there might be a conversion script that makes old _IE.au3 scripts compatible with the newer version. Search the forums. Good luck
  8. Hi I need to submit a form on a webpage using _IE.au3. I tried _IEFormSubmit, but it halted the script after submitting the form. The documentation suggests _IEAction. Here is the relevant portion of the site: <form action="ISAPI.dll" method="post"> <input type="hidden" name="MfcISAPICommand" value=""> <input type="hidden" name="item" value=""> <input type="hidden" name="Username" value=""> <input type="radio" name="isBRT" value="0"> <input type="radio" name="isBRT" value="1" checked> <input type="submit" value="Continue >"> </form> Here is the relevant autoit code: $oForm = _IEFormGetCollection($oIE, 2) _IEFormElementRadioSelect($oForm, "0", "isBRT") $oBtn = _IEFormElementGetCollection($oForm, 5) _IEAction($oBtn, "click") _IELoadWait($oIE) And here is the error: --> COM Error Encountered in Action.au3 ----> $IEComErrorScriptline = 1316 ----> $IEComErrorNumberHex = 80020003 ----> $IEComErrorNumber = -2147352573 ----> $IEComErrorWinDescription = Member not found. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = ----> $IEComErrorLastDllError = 0 --> IE.au3 Error from function _IEAction, $_IEStatus_InvalidDataType I know my form object is correct, because the correct radio button is selected on the page. I've searched the forum and re-read the helpfile on this, but I can't seem to fix it, even though another part of my script uses _IEAction to submit a different form and it works. Thanks in advance for your help
  9. An idea: When entering a new snippet, there should be an optional field for 'forum link', so the author can link back to his original post in scripts and scraps. Love the site. cheers
  10. Very well done, nice categories. I don't mean to be offensive, but I find it much more usable than autoitking's solution. cheers
  11. Check out gafrost's post: http://www.autoitscript.com/forum/index.ph...st&p=149631 May be what you are looking for. Don't forget to search the forums Regards,
  12. You need to provide more code. GUICtrlSetData is not making your GUI flicker or perform whatever 'funky screen rewrite' you mention. If you put the GUICtrlSetData in this loop: While @InetGetActive TrayTip("Downloading " & $rarfilename, "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead, 10, 16) Sleep(250) Wend your GUI is flickering because it is updating every 250 ms. Instead, you'll need to initialize a timer or find another workaround so that your GUI updates every second or two. Regards,
  13. Something as simple as: guicreate("Synchronization in Progress",400,250,-1,-1,-1,$WS_EX_TOPMOST) guisetbkcolor(0xffffff) Guisetfont(14, 400,0 ,"Courier") guictrlcreatelabel("Database Syncronization running. Bases will", 2, 10) guictrlcreatelabel("be shut down until complete.", 2, 25) $status = guictrlcreatelabel("Current Status: ", 2, 45) guictrlcreatepic("C:\Documents and Settings\jfritzsche\My Documents\My Pictures\Docubase Projects\transparent logo.gif", 90, 175, 0, 0) guisetstate(@sw_show) . . . ;During FTP Transaction GuiCtrlSetData($status, "Current Status: "&"Downloading " & $rarfilename & "Total Size: " & $ftpsize & "Total Transferred : " & @InetGetBytesRead) I hope this helps. If I'm misunderstanding you, please expand.
  14. Well, I Really have no idea what you are trying to do, but here's a stab at something that might get you started: #include <GUIConstants.au3> GUICreate("My GUI picture",350,275,-1,-1,$WS_POPUP) GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic("D:\temp\jpg\toto.jpg",0,0,250,250) $b=GuiCtrlCreateButton("Close", 150, 250, 50, 25) GUISetState () While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $b ExitLoop EndSelect Wend Exit 1) The $WS_POPUP style is used to make a window without a title bar. 2) You will have to change the GUICtrlCreatePic function so that the parameters match your image. 3) And if the user clicks the button "Close", I have the windows close. I believe this is what you requested. I hope this helps. For further help, try consulting the helpfile. If your native language is not english, I believe there are translations of the file available.
  15. This is one way of doing it, although there may be other ways: #include <GuiConstants.au3> Opt("MouseCoordMode", 0) Opt("PixelCoordMode", 0) Opt("MouseClickDelay", 0) Opt("MouseClickDownDelay", 0) ;###/"Choose Game - Gui"\### If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000 $ChooseGame = GuiCreate("Multi-Flash Bot", 290, 90,(@DesktopWidth-290)/2, (@DesktopHeight-90)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Group_1 = GuiCtrlCreateGroup("Choose a Game from List", 10, 10, 270, 70) $Combo = GuiCtrlCreateCombo("Games", 30, 40, 140, 21) GUICtrlSetData($Combo,"ReBound") GUICtrlSetData($Combo,"Clickage") $BotButton = GuiCtrlCreateButton("Bot!", 190, 30, 70, 40) GuiSetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $BotButton If GuiCtrlRead($combo) = "ReBound" Then GuiSetState(@SW_HIDE, $ChooseGame) $Game = "ReBound" _GameGUI($game) GuiSetState(@SW_SHOW, $ChooseGame) EndIf If GuiCtrlRead($combo) = "Clickage" Then GuiSetState(@SW_HIDE, $ChooseGame) $Game = "Clickage" _GameGUI($game) GuiSetState(@SW_SHOW, $ChooseGame) EndIf Case Else EndSelect WEnd Func _GameGUI($game) $MainGui = GuiCreate("MyGUI", 650, 500,(@DesktopWidth-650)/2, (@DesktopHeight-500)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $oGame = ObjCreate ("ShockwaveFlash.ShockwaveFlash.1") $FlashGui = GUICtrlCreateObj($oGame, 10, 10, 630, 440) $ChangeGame = GuiCtrlCreateButton("Change Game", 10, 460, 90, 30) $Exit = GuiCtrlCreateButton("Exit", 120, 460, 90, 30) ;###/"Bot Function"\### If $Game = "ReBound" then With $oGame .bgcolor = "#000000" .Movie = 'http://farm.addictinggames.com/D78AQSAKQLQWI9/2898.swf' .ScaleMode = 2 .Loop = True .wmode = "Opaque" EndWith EndIf If $Game = "Clickage" Then With $oGame .bgcolor = "#000000" .Movie = 'http://farm.addictinggames.com/D78AQSAKQLQWI9/2898.swf' .ScaleMode = 2 .Loop = True .wmode = "Opaque" EndWith EndIf GuiSetState(@SW_SHOW, $MainGUI) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE GUIDelete($MainGUI) Return Case $msg = $Exit GUIDelete($MainGUI) Return EndSelect WEnd EndFunc I separated the game gui into its own function. The $choosegame Gui calls the _GameGUI Function with $game as an argument. I think this approach may prove more useful, given the nature of your program. For example, you could modify the function like Func _GameGUI($game, $gameURL="") so that the user could enter the URL of a custom flash game, should they desire. For more information on functions, consult the helpfile. I hope this helps.
×
×
  • Create New...