Jump to content

Jerrif

Members
  • Posts

    6
  • Joined

  • Last visited

Jerrif's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Oh whoops, I must have misread your OP! I find that odd though, because the script works just fine for me. Even if I go copy -> paste -> copy -> paste, it seems to work as intended.
  2. The selection is still added to the clipboard, it's just placed after the previous last entry. I think you just need to add $counter = 0 to the emptyAll() function Func emptyAll() For $i=0 To 49 $clipBoard[$i]="" Next ClipPut("") $counter =0 EndFunc
  3. Ahh, I see now! Thank you very much Dale! Unfortunately, sloppy coding is all I know how to do, but I like to think that with every mistake I'm at least learning something (although the concept of variable scope went way over my head when my brother tried explaining it to me )
  4. Hi, I'm busy trying to write a script that creates a GUI where the user can select a bunch of programs to launch. That part's easy enough, although I also want the GUI to display a few other things. I've managed to get 2 more child GUIs to pop up with images using InetGet(), but I'm struggling with retrieving text from _IECreate(), and at the same time keeping the GUI active. My solution looks pretty inelegant to me, but I can't think of any better way to do it: #include <IE.au3> #include <String.au3> $server1URL = "http://www.gametracker.com/server_info/113.212.96.249:16567/" $curServer = "" ragamuffin() Func GUIloopy() ;This is where the GUI loop goes While 1 If _IEPropertyGet($curServer, "busy") = False Then ConsoleWrite("Done") ExitLoop EndIf WEnd EndFunc _IEQuit($curServer) Func ragamuffin() $curServer = _IECreate($server1URL, 0, 0, 1) Do loopy() Until _IEPropertyGet($curServer, "busy") = False $curReadText = _IEBodyReadText($curServer) $currentMapLame = _StringBetween($curReadText, "CURRENT MAP ", "Is") $currentMap = $currentMapLame[0] $currentMap = StringStripWS($currentMap,7) MsgBox(0, "blah", $currentMap) _IEQuit($curServer) EndFunc Now, this code works fine for me in my main script, but I can't help but notice that it gives me the error: --> IE.au3 V2.4-0 Error from function _IEPropertyGet, $_IEStatus_InvalidDataType Seemingly every time it loops the GUI. Anyway, the script works just fine, I was just wondering if I should be concerned about the (orange) error, or just ignore it? Also, is that a stupid way of keeping the GUI 'active'? Is there a better way I could do it?
  5. That's exactly what I was looking for! Thanks for the help!
  6. Hi, I'm trying to write a script that (amongst other things) displays a .PNG picture from a website, in a GUI. I simply want to link directly to the image, so this is what I've tried so far #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded() GUICreate("Embedded Control Test", 640, 480, "", "", $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_CLIPCHILDREN) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) GUISetState() _IENavigate($oIE, "http://cache.www.gametracker.com/server_info/113.212.97.73:16567/banner_160x400_T0_F-1_CFF6633-FFFFFF-7E7D8C-002850.png") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd This method seems to work fine for any other image type, but when I try it with a .PNG, the image doesn't display. Something that I found odd however, is that if loaded as part of a webpage, the .PNG will load correctly. Am I doing something wrong, is there a way around this, or am I doomed to not have pretty pictures in my GUI?
×
×
  • Create New...