-
Posts
93 -
Joined
-
Last visited
-
Days Won
3
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by coderusa
-
If it has little meaning, then perhaps you're not looking outside the box. In the snippet every time Assign or Eval is used, without them there would be an additional 4 to 10 lines per object. Its meant to be looked at, pondered. There is no problem, like I said, only various ways of doing things. AutoIt Maps are useful but my system design is called mROM (modular read only memory) which requires .ini files to do/play certain things. (thus making it modular) Sure I could load the files into a autoit map, but again, unnecessary repetition. The script loads part of the file data directly into constants and the rest of the data is fetched from the file on the fly there is no need to repeat the info for a map or object dictionary. My point is, Assign and Eval are useful and not complex, and you can use them in a loop to tighten up your script and reduce areas of error,
-
I'm not having any particular issue the above snippet works perfectly in the source, more engaging in a discussion on the uses of these two functions. In fact my issue (when I had one) was fixed by Assign() and Eval() in the above snippet, at least in this scope here. The snippet is merely an example of how I've used these two functions to get around a long repetitive code, and this is the only time I need to use Assign() and Eval() in the script (apart from using it elsewhere for the $mROM_oBound_X) It can work without Assign() and Eval() but requires much more repetition in the code. This way is tighter and, interestingly, CPU % isa little lower this way too (only about a 2% difference on my machine)
-
We could be going down the rabbit hole, but its not the issue of brackets or arrays, it's the scope of what you need and where you need it. I can agree that if you throw Assign() and Eval() all over the place you're going to get bound up into bugs. The thing about programming is that you "learn the way then find your own way." Let me give you a snippet. This draws up to 10 objects in one area. I don't expect you to understand what's going on here but this bit of code would be 10x longer without Assign() and Eval() and this is the only way I can get it to work WITHOUT bugs. In fact using arrays to do this made this small section of code so long and cumbersome that I spent the better part of a weekend chasing bugs. All of the variables that start with "$o" (i,e, $oName, $oData) are temporary information and do not need to be used after the loop continues or ends. If Not ($mROM_OBJECTS = "None") Then ;Preparing and drawing objects, if the list is not empty (None) $GFX_OBJECTS = StringSplit($mROM_OBJECTS, Chr(63)) ;Object List from ROM (this constant is set when the ROM loads) For $GFX = 1 To $GFX_OBJECTS[0] Step 1 ;;Each Object (Obj1, Obj2 etc) is a token string separated by Chr(44) "ObjectName,ObjectPack,X,Y" $oName1 = "Obj" & $GFX $oData1 = $GFX_OBJECTS[$GFX] Assign($oName1, $oData1, 2) ;Cons($oName1 & ": " & Eval($oName1)) ;;Retreiving info from .ini and loading to GDI+ $oName2 = "oImage" & $GFX $ObjName = _Token($GFX_OBJECTS[$GFX], "R", "44", "2") $oData2 = _xIni("objects_library.ini", "OBJ-" & StringUpper($ObjName), "main_image", "R") Assign($oName2, _GDIPlus_ImageLoadFromFile($oData2), 2) ;Cons($oName2 & ": " & Eval($oName2)) ;;Setting Object Location (X,Y) $oNameA = _Token(Eval($oName1), "R", "44", "1") $oPostX = _Token(Eval($oName1), "R", "44", "3") $oPostY = _Token(Eval($oName1), "R", "44", "4") ;;Setting Object Width/Height (W,H) $ObjSize = _xIni("objects_library.ini", "OBJ-" & StringUpper($ObjName), "size", "R") $oPostW = _Token($ObjSize, "R", "44", "1") $oPostH = _Token($ObjSize, "R", "44", "2") ;;Setting Object Coordinates and boundaries (cant walk over objects also use these coordinates in other places) $oMinX = $oPostX - $oPostW + 30 $oMaxX = $oMinX + $oPostW + 30 $oMinY = $oPostY - $oPostH + 10 $oMaxY = $oMinY + $oPostH - 30 $oCOORD = $oMinX & Chr(44) & $oMaxX & Chr(44) & $oMinY & Chr(44) & $oMaxY ;Cons("oCOORD: " & $oCOORD) ;;Drawing imagerect and then continueing the loop until 1 to 10 Objects (or end of list) is reached. $oNameX1 = "mROM_oBOUND_" & $GFX Assign($oNameX1, $oCOORD, 2) ;This sets the cant walk over objects coordinates for later use ;Cons($oNameX1 & ": " & Eval($oNameX1)) _GDIPlus_GraphicsDrawImageRect($hGfx, Eval($oName2), $oPostX, $oPostY, $oPostW, $oPostH) Next EndIf I have tried various ways of writing this and this is the only way to get it work perfectly. I'll share this too. Some of you may find it useful or can make it better, I only made it for what I needed. ;---====> _Token("String,Of,Tokens", "C,R", "Chr#", "Token#Slot", "Data") Func _Token($tokenS, $prm, $char, $tokN, $data = " ") $token = StringSplit($tokenS, Chr($char)) ;_Token("String,Of,Tokens", "C", "44", "1,2,3...X" "NewToken") - Replaces Xth token with "NewToken" If $prm = "C" Then $NewTokList = " " For $wc = 1 To $token[0] Step 1 If $wc = $tokN Then $NewTok = $data Else $NewTok = $token[$wc] EndIf If $NewTokList = " " Then $NewTokList = $NewTok ContinueLoop Else $TempTok = $NewTokList & Chr($char) & $NewTok $NewTokList = $TempTok ContinueLoop EndIf Next Return $NewTokList ;_Token("String,Of,Tokens", "R", "44", "1,2,3...X") - Returns Xth token from the string Elseif $prm = "R" Then $Token = StringSplit($tokenS, Chr($char)) For $TokenSlot = 1 To $Token[0] Step 1 If $TokenSlot = $tokN Then Return $Token[$tokN] Else ContinueLoop EndIf Next ;Debug("$token[0]", $token[0] & "$tokN: " & $tokN) ;Return $token[$tokN] EndIf EndFunc ;<====--- _Token() ;<===
-
That is your opinion on it. Doing it this way seems less confusing (to me) than wasting space on repetitive code lines with a ton of arrays or random variables. You name your variables appropriately so you don't get BrainFucked and Whitespaced trying to figure out how many times you assigned $x, and where, when you could have instead assigned $x1, $x2, $x3 and can pin point your location in the script and you have a dedicated variable to that process, a variable that can't get mixed up elsewhere in the script. The more you universalize the code the more confusing it becomes. Keep a system, and keep it standardized, it makes everything easier.
-
The name of a variable is important, if you just assign random variables 1) You forget what the heck you're doing 2) Its easier with a systematic variable name that has some kind of system to it other than an array, and 3) You run into trouble using the same variable names too much and end up chasing bugs you could have otherwise avoided. I like this. Only $mROM_OBJECTS = "Image1.Gif,X,Y,W,H~Image2.GIF,X,Y,W,H" etc Then when it comes time to handle the objects, For $x = 1 To 10 Step 1 ;Limits to 10 objects $vName = "Obj" & $x $data = StringSplit(Eval($vName), Chr(44)) _GDIPlus_GraphicsDrawImageRect($hGfx, $data[1], $data[2], $data[3], $data[4], $data[5]) Next To completely grasp what I am doing with Assign() and Eval() would require me to post a lot of source code and explanation, which I may do in the future, but mostly I am sharing my experience with this "uselessly complex" code
-
Came across a need to have a "dynamic" variable system in one of my projects. I did research only to find that most people, in the threads I read, instead suggest using arrays instead of a dynamic variable, also read some comments about Assign() and Eval() not being very useful in most cases, and could make your code uselessly complex and hard to understand. I do not see this issue with Assign() and Eval(). If I am writing a script and I need 10 specific variables that need a specific name, and specific data, without Assign() $GFX_OBJECT = StringSplit($mROM_OBJECTS, Chr(126)) If $GFX_OBJECT[0] >= 1 Then $Obj1 = $GFX_OBJECT[1] ElseIf $GFX_OBJECT[0] >= 2 Then $Obj2 = $GFX_OBJECT[2] ElseIf $GFX_OBJECT[0] >= 3 Then $Obj3 = $GFX_OBJECT[3] ElseIf $GFX_OBJECT[0] >= 4 Then $Obj4 = $GFX_OBJECT[4] ElseIf $GFX_OBJECT[0] >= 5 Then $Obj5 = $GFX_OBJECT[5] ElseIf $GFX_OBJECT[0] >= 6 Then $Obj6 = $GFX_OBJECT[6] ElseIf $GFX_OBJECT[0] >= 7 Then $Obj7 = $GFX_OBJECT[7] ElseIf $GFX_OBJECT[0] >= 8 Then $Obj8 = $GFX_OBJECT[8] ElseIf $GFX_OBJECT[0] >= 9 Then $Obj9 = $GFX_OBJECT[9] ElseIf $GFX_OBJECT[0] >= 10 Then $Obj10 = $GFX_OBJECT[10] EndIf Then when I need to use $Obj1 thru $Obj10, I will have to add 10 specific If statements (or specific code) for each specific variable. If I instead use Assign() (with a For loop....) I achieve the same result more effeciently. $GFX_OBJECT = StringSplit($mROM_OBJECTS, Chr(126)) For $GFX = 1 To $GFX_OBJECT[0] Step 1 $vName = "Obj" & $GFX $vData = $GFX_OBJECT[$GFX] Assign($vName, $vData, 2) Next Then later on in the script, when I need to Use Obj1 thru $Obj10, I will use another For loop To 10 so it can use Eval() to check thru the variables and perform what's needed. You could even set a variable inside the first loop that will store $var = $Array[0] value to use later with Eval(). (For $x = 1 To $var) There may only be few instances where you need to use Assign() and Eval() but I don't see why people say it will make the code "uselessly complex"
-
Thank you Andreik, that actually helps me a lot. I can read descriptions and stuff but to really get a hold of it I need "hands on" and the more examples I can find the better. Especially smaller snippets like these, some of the larger GDI examples, at this point, confuse me in my GDI+ n00bness 😆 This morning, with some "fresh eyes" I combed through the forums again and found a example written by UEZ that also helps. ;Example by UEZ #include <GDIPlus.au3> #include <GUIConstantsEx.au3> _GDIPlus_Startup() Global $hGUI = GUICreate("", 600, 400) GUISetBkColor(0xF0F0F0, $hGUI) Global $iBtn = GUICtrlCreateButton("Display", 500, 300, 50, 50) GUISetState() $hCanvas = _GDIPlus_GraphicsCreateFromHWND($hGUI) $hBitmap = _GDIPlus_BitmapCreateFromGraphics(193, 184, $hCanvas) ;size of the torus.png image $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap) $hImage1 = _GDIPlus_ImageLoadFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\merlin.gif") ;size is 68x71 $hImage2 = _GDIPlus_ImageLoadFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\Torus.png") ;size is 193x184 _GDIPlus_GraphicsDrawImageRect($hGfx, $hImage1, 0, 0, 68, 71) _GDIPlus_GraphicsDrawImageRect($hCanvas, $hBitmap, 0, 0, 193, 184) Do Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $iBtn _GDIPlus_GraphicsClear($hGfx, 0xFFF0F0F0) _GDIPlus_GraphicsDrawImageRect($hGfx, $hImage2, 0, 0, 193, 184) _GDIPlus_GraphicsDrawImageRect($hCanvas, $hBitmap, 0, 0, 193, 184) EndSwitch Until False _GDIPlus_GraphicsDispose($hCanvas) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_ImageDispose($hImage1) _GDIPlus_ImageDispose($hImage2) _GDIPlus_ImageDispose($hBitmap) _GDIPlus_Shutdown() GUIDelete()
-
I'm playing around with some GDI+ (be easy, it's my first time...) I am not quite sure how to properly clear an image after it has been created. I can get the picture to display where I want it, but I cannot for the life of me figure out how to clear it. I've spent the last 4 hours searching and looking through example scripts, help file info and of course forum stuff. Nothing seems to properly explain (to me) how to clear the image while leaving everything else intact. I've tried various different methods, and they either close the script in error, clear the entire GUI (including buttons) to black, or (currently) just closes the GUI with no error messages.... 🤯 #include <GUIConstantsEx.au3> #include <GDIPlus.au3> #include <WindowsConstants.au3> Global $hGUI = " " Global $Button = " " Global $hBitmap = " " Global $hGraphic = " " _Test() While 1 $GUIGetMsg = GUIGetMsg(1) If $GUIGetMsg[1] = $hGUI Then Switch $GUIGetMsg[0] Case 0 ContinueLoop Case $GUI_EVENT_CLOSE Exit Case $Button _ClearImg() ContinueLoop EndSwitch EndIf WEnd Func _Test() $hGUI = GUICreate("GDI+", 400, 300, -1, -1, $WS_CAPTION+$WS_POPUP+$WS_EX_APPWINDOW) GUISetIcon("creator.ico", $hGUI) $Button = GUICtrlCreateButton("Clear", 5, 270, 80, 20) ;clear image and display next image GUISetState() _Draw("TestImage2.bmp") EndFunc ;Clear drawn image Func _ClearImg() _GDIPlus_StartUp() $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsClear($hBitmap) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_ImageDispose($hBitmap) _GDIPlus_Shutdown() EndFunc ;_Draw("filename") Func _Draw($data) _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromFile($data) $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImage($hGraphic, $hBitmap, 5, 5) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() EndFunc
-
Need some help with a GUI, IE stuff and tooltips
coderusa replied to coderusa's topic in AutoIt GUI Help and Support
Those are the only issues that have had me scratching my head. The rest is just stuff that needs to be tweaked or finished into the GUI. Tho, Its going to be more than just a chat script, the end goal is a online role playing game that uses IRC protocol for users to connect a server, chat and play. Game interaction will use a numeric data system I've designed that sends numeric type CTCP data (almost like raw data) between users and/or an automated chat bot. Still a long way from finished but the base core script does work pretty well. -
Need some help with a GUI, IE stuff and tooltips
coderusa replied to coderusa's topic in AutoIt GUI Help and Support
Thank for explaining that bit about the CSS, I've been researching but I didn't fully understand that part, but now I do. Ive used AutoIT a bit but this is honestly my first in depth leap into AutoIT GUI stuff. Coding most of the functionality was the easy part, I'm finding that applying the functionality into the GUI and having it work and look good is the tricky part but I'm picking it up as I go. 😉 As for the 3rd Issue, I had tried that example before and, as I recall, it didn't make a change, but I will re-read the example and try again.... ...And after reviewing that I think I've got that part taken care of now.... So that's fixed, Thank you Andreik That's two checks off the list. Here is the updated snippet #Include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> Global $oIE = " " Global $_RPGui = " " $sHTML = "<HTML>" & @CR $sHTML &= "<HEAD>" & @CR $sHTML &= '<style type="text/css"><!-- body { margin: 8px; line-height: 24px;} --></style>' $sHTML &= "</HEAD>" & @CR $sHTML &= "<BODY bgcolor=""#050565"">" & @CR $sHTML &= "</BODY>" $sHTML &= "</HTML>" _RPGui() ;Keep GUIs open, keep IRC connection open While 1 ;----=====> $_RPGui - Main GUI If $_RPGui Then $GUIGetMsg = GUIGetMsg(1) Switch $GUIGetMsg[0] Case 0 ContinueLoop Case $GUI_EVENT_CLOSE ;Need to add more here Exit Case $GUI_EVENT_MOUSEMOVE ;Mouse position in GUI If $GUIGetMsg[0] >= 1 Then ConsoleWrite("MOUSE POS GUI - X: " & $GUIGetMsg[4] & " Y: " & $GUIGetMsg[5] & @CRLF) EndIf EndSwitch ;Mouse position on screen ;ConsoleWrite("MOUSE POS AutoIT - X: " & MouseGetPos(0) & " Y: " & MouseGetPos(1) & @CRLF) EndIf WEnd ;DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($hCheckbox), "wstr", 0, "wstr", 0) ;Main GUI Func _RPGui() ;Prepare IE elements $oIE = _IECreateEmbedded() $oIE2 = _IECreateEmbedded() ;GUI $_RPGui = GUICreate("RPG", 1495, 975, 5, 5, $WS_CAPTION+$WS_POPUP+$WS_MAXIMIZEBOX+$WS_EX_APPWINDOW) GUISetFont("12", "680", "", "Courier", $_RPGui) GUISetBkColor(0x050565) ;Royal Blue ;----=====> FileMenu $filemenu = GUICtrlCreateMenu("&File") $fileitem = GUICtrlCreateMenuItem("Exit", $filemenu) ;----=====> ToolBar $TB1 = GUICtrlCreateButton("", 1, 1, 40, 40, $BS_DEFPUSHBUTTON+$BS_ICON) GUICtrlSetImage($TB1, "Comp1.ico") GUICtrlSetResizing($TB1, $GUI_DOCKALL) GUICtrlSetTip($TB1, "Connect", "", 1) $TB2 = GUICtrlCreateButton("", 42, 1, 40, 40, $BS_DEFPUSHBUTTON+$BS_ICON) GUICtrlSetImage($TB2, "Globe.ico") GUICtrlSetResizing($TB2, $GUI_DOCKALL) GUICtrlSetTip($TB2, "Server Options", "", 1) $TB3 = GUICtrlCreateButton("", 84, 1, 40, 40, $BS_DEFPUSHBUTTON+$BS_ICON) GUICtrlSetImage($TB3, "Book2.ico") GUICtrlSetResizing($TB3, $GUI_DOCKALL) GUICtrlSetTip($TB3, "Profile", "", 1) ;----=====> Status Bar GUICtrlCreateGroup("", 1, 38, 1490, 40) $Label1 = GUICtrlCreateLabel("<----------------------------------------------Status info here-------------------------------------------->", 5, 52, 1400, 15) GUICtrlSetColor($Label1, "0xAABBFF") ;----=====> Main Input Box And ">" Button $InputBox = GUICtrlCreateInput("Main text input/command line", 10, 925, 1150, 21) GUICtrlSetResizing($InputBox, $GUI_DOCKAUTO) $InputButton = GUICtrlCreateButton(">", 1165, 922, 90, 26) GUICtrlSetResizing($InputButton, $GUI_DOCKAUTO) ;----=====> Channel Users List & Buttons $Group1 = GUICtrlCreateGroup("Channel Users List", 1260, 605, 230, 185) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group1), "wstr", 0, "wstr", 0) GUICtrlSetColor($Group1, 0xAABBFF) $UserBox = GUICtrlCreateList("Offline", 1265, 625, 220, 125) ;----=====> Friends List & Buttons $Group2 = GUICtrlCreateGroup("Friends", 1260, 780, 230, 170) DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", GUICtrlGetHandle($Group2), "wstr", 0, "wstr", 0) GUICtrlSetColor($Group2, 0xAABBFF) $FriendBox = GUICtrlCreateList("Offline", 1265, 800, 220, 110) ;----=====> Text/Image Display $_RPGie1 = GUICtrlCreateObj($oIE, 5, 610, 1250, 305) GUICtrlSetResizing($_RPGie1, $GUI_DOCKAUTO) _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) _IEHeadInsertEventScript($oIE, "document", "oncontextmenu", "return false") _IEBodyWriteHTML($oIE, "<br><br><font face=""Lucida Console"" color=""#AABBFF"" size=""6"">_IE_Object: $_RPGie1 - HTML Text/Image display.</font>") ;----=====> Visual Display $_RPGie2 = GUICtrlCreateObj($oIE2, 265, 90, 990, 510) GUICtrlSetResizing($_RPGie2, $GUI_DOCKAUTO) _IENavigate($oIE2, "about:blank") _IEDocWriteHTML($oIE2, $sHTML) _IEHeadInsertEventScript($oIE2, "document", "oncontextmenu", "return false") _IEBodyWriteHTML($oIE2, "<br><br><font face=""Lucida Console"" color=""#AABBFF"" size=""6"">_IE_Object: $_RPGie2 - HTML visual display.</font>") Sleep(800) GUISetState() EndFunc -
Hey guys, my current AutoIT project is giving me some issues. I'm using v3.3.8.1 (Specifically this version because there was a change in TCPSend/Recv, or something, in a AutoIT update and the script doesn't work properly in newer versions of AutoIt. Spent days trying to figure it out, gave up and reverted back to known working version). NOT MY ISSUE. My issue lies in a couple things. First off, ToolTip() if I assign a tooltip for something, the moment I run the script, the ToolTip pops up regardless of mouse position and stays on the screen until I close out the script. I know to get the ToolTip off the screen I have to call ToolTip() again, but I only want the ToolTip to display when the mouse is over a certain GUI control. I was thinking about assigning the X/Y value for ToolTip() by using GUIGetMsg(1) to get a $GUI_EVENT_MOUSEMOVE, using the advanced options in GUIGetMsg(1) the $array[4] and $array[5] which are supposed to carry the mouse position X, Y, but they do not return anything no matter what I try to do (Constantly getting array dimension exceeded, or variable not array type errors) . All I want to achieve here is when the mouse moves over a GUI button, a tooltip will popup. I've searched google and the help file, I am getting the understanding of what I need to do, but not sure why I cant retrieve the mouse position INSIDE the GUI. If I use MouseGetPos() I can get the mouse position wherever it is on the screen, but I only need mouse position while inside the GUI. EDIT: In fact I dont even get a $GUI_EVENT_MOUSEMOVE from GUIGetMsg (1) when the mouse is moved inside the GUI... Second issue, using IE embedded elements. I've noticed when I put text into the IE element, the lowermost bottom portion of the text is cut off, the area where letters like p, q, g, y it cuts the bottom part of the text off if I go over a certain text size. Not sure what I can do about this. Last thing is, coloring text on GUICtrlCreateGroup() and GUICtrlCreateCheckbox(), none of the GUI set color functions seem work for changing text color on these two controls. Everything else the text color seems to be working fine for me. (One way around this is I create the group or checkbox without text and use GUICtrlCreateLabel() to put a colored, matching label over the controls, works aesthetically, but in the case of checkboxes, you arent able to click the label text to make the checkbox checked/unchecked.... Am I missing something or do these two controls just not like being painted? Here is the current code I have for this GUI. I'm not going to post all 8000 or so lines, but this snippet here works the same outisde the script and shows my issues. I'm using ConsoleWrite() to display the mouse poisition in the SciTe debug window. #Include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> Global $oIE = " " Global $_RPGui = " " $sHTML = "<HTML>" & @CR $sHTML &= "<HEAD>" & @CR $sHTML &= '<style type="text/css"><!-- body { margin: 4px; line-height: 16px;} --></style>' $sHTML &= "</HEAD>" & @CR $sHTML &= "<BODY bgcolor=""#050565"">" & @CR $sHTML &= "</BODY>" $sHTML &= "</HTML>" _RPGui() ;Keep GUIs open, keep IRC connection open While 1 ;----=====> $_RPGui - Main GUI If $_RPGui Then $GUIGetMsg = GUIGetMsg(1) Switch $GUIGetMsg[0] Case 0 ContinueLoop Case $GUI_EVENT_CLOSE ;Need to add more here Exit EndSwitch EndIf WEnd ;Main GUI Func _RPGui() ;Prepare IE elements $oIE = _IECreateEmbedded() $oIE2 = _IECreateEmbedded() ;GUI $_RPGui = GUICreate("RPG", 1495, 975, 5, 5, $WS_CAPTION+$WS_POPUP+$WS_MAXIMIZEBOX+$WS_EX_APPWINDOW) GUISetFont("12", "680", "", "Courier", $_RPGui) GUISetBkColor(0x050565) ;Royal Blue ;GUICtrlSetDefColor(0xAABBFF) ; RPG Text ;----=====> FileMenu $filemenu = GUICtrlCreateMenu("&File") $fileitem = GUICtrlCreateMenuItem("Exit", $filemenu) ;----=====> ToolBar $TB1 = GUICtrlCreateButton("", 1, 1, 40, 40, $BS_DEFPUSHBUTTON+$BS_ICON) GUICtrlSetImage($TB1, "Comp1.ico") GUICtrlSetResizing($TB1, $GUI_DOCKALL) ;Tool Tip for $TB1 ToolTip("Info here", 40, 40, "ToolTip", 1) $TB2 = GUICtrlCreateButton("", 42, 1, 40, 40, $BS_DEFPUSHBUTTON+$BS_ICON) GUICtrlSetImage($TB2, "Globe.ico") GUICtrlSetResizing($TB2, $GUI_DOCKALL) $TB3 = GUICtrlCreateButton("", 84, 1, 40, 40, $BS_DEFPUSHBUTTON+$BS_ICON) GUICtrlSetImage($TB3, "Book2.ico") GUICtrlSetResizing($TB3, $GUI_DOCKALL) ;----=====> Status Bar GUICtrlCreateGroup("", 1, 38, 1490, 40) $Label1 = GUICtrlCreateLabel("<----------------------------------------------Status info here-------------------------------------------->", 5, 48, 1400, 15) GUICtrlSetColor($Label1, "0xAABBFF") ;----=====> Main Input Box And ">" Button $InputBox = GUICtrlCreateInput("Main text input/command line", 10, 925, 1150, 21) GUICtrlSetResizing($InputBox, $GUI_DOCKAUTO) $InputButton = GUICtrlCreateButton(">", 1165, 922, 90, 26) GUICtrlSetResizing($InputButton, $GUI_DOCKAUTO) ;----=====> Channel Users List & Buttons GUICtrlCreateGroup("Channel Users List", 1260, 605, 230, 185) $UserBox = GUICtrlCreateList("Offline", 1265, 625, 220, 125) ;----=====> Friends List & Buttons GUICtrlCreateGroup("Friends", 1260, 780, 230, 170) $FriendBox = GUICtrlCreateList("Offline", 1265, 800, 220, 110) ;----=====> Text/Image Display $_RPGie1 = GUICtrlCreateObj($oIE, 5, 610, 1250, 305) GUICtrlSetResizing($_RPGie1, $GUI_DOCKAUTO) _IENavigate($oIE, "about:blank") _IEDocWriteHTML($oIE, $sHTML) _IEHeadInsertEventScript($oIE, "document", "oncontextmenu", "return false") _IEBodyWriteHTML($oIE, "<br><br><font face=""Lucida Console"" color=""#AABBFF"" size=""6"">_IE_Object: $_RPGie1 - HTML Text/Image display.</font>") ;----=====> Visual Display $_RPGie2 = GUICtrlCreateObj($oIE2, 265, 90, 990, 510) GUICtrlSetResizing($_RPGie2, $GUI_DOCKAUTO) _IENavigate($oIE2, "about:blank") _IEDocWriteHTML($oIE2, $sHTML) _IEHeadInsertEventScript($oIE2, "document", "oncontextmenu", "return false") _IEBodyWriteHTML($oIE2, "<br><br><font face=""Lucida Console"" color=""#AABBFF"" size=""6"">_IE_Object: $_RPGie2 - HTML visual display.</font>") Sleep(800) GUISetState() EndFunc