Jump to content

GraaF1337

Active Members
  • Posts

    104
  • Joined

  • Last visited

Everything posted by GraaF1337

  1. How does this help me in anyway? I want to center the text inside the list? o.O
  2. I'm seem to be unable to center the text in a "GUICtrlCreateList"? Tried "$SS_CENTER" that didn't work?
  3. Thank you, this helped me with the Processes suspending How i just need to know how to Monitor my CPU and use it in a GUI >.<
  4. I know how to close, kill processes and such. I need to know how to suspend it, so i can resume it later on ^^
  5. CPU Useage: I've been searching and it seems all the threads i've been able to find are from 06 to 08 ^^ And none of them fully did what I'm looking for ^^ I'm looking for a way to monitor all processes and see how much CPU they use. So i could create a small GUI which shows the top10 processes which uses the most CPU and have it on my secound monitor. (I know you can download programs that do something like that, but i enjoy to design and such my self) Suspend process: Also anyway to suspend a process? Again i searched but all threads are from 06-08 ^^
  6. Facking love you sometimes! Thank you alot!
  7. I want to do something like, draw a graphic, then if i press "+" or "-" it will either make the graphic bigger or small once i click the "update" button. I tried this but it dont work.. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #NoTrayIcon $Form1 = GUICreate("Change Drawing", 617, 440, 192, 124) GUISetState(@SW_SHOW) $size = 100 $drawinggui = GUICtrlCreateGraphic(75, 75, $size, $size) GUICtrlSetColor($drawinggui, 0xFF0000) $update = GUICtrlCreateButton("Update", 100, 20) $plus = GUICtrlCreateButton("+", 143, 20, 15) $min = GUICtrlCreateButton("-", 85, 20, 15) $show2 = GUICtrlCreateLabel($size, 112, 50) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $update GUICtrlSetData($drawinggui, $size) Case $plus $size +=10 GUICtrlSetData($show2, $size) Case $min $size -=10 GUICtrlSetData($show2, $size) EndSwitch WEnd
  8. It wont help him play or have anything to do with the game it self, all he wants to do is have a script which sell/buy items on marketplace
  9. Just tried to use "GuiCtrlSetData" to resize the graphic, that doesn't seem to work.. #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <StaticConstants.au3> #NoTrayIcon $Form1 = GUICreate("Change Drawing", 617, 440, 192, 124) GUISetState(@SW_SHOW) $size = 100 $drawinggui = GUICtrlCreateGraphic(75, 75, $size, $size) GUICtrlSetColor($drawinggui, 0xFF0000) $update = GUICtrlCreateButton("Update", 100, 20) $plus = GUICtrlCreateButton("+", 143, 20, 15) $min = GUICtrlCreateButton("-", 85, 20, 15) $show2 = GUICtrlCreateLabel($size, 112, 50) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $update GUICtrlSetData($drawinggui, $size) Case $plus $size +=10 GUICtrlSetData($show2, $size) Case $min $size -=10 GUICtrlSetData($show2, $size) EndSwitch WEnd
  10. I'm unable to resize the graphic? Understand me right, i want to make the graphic bigger after it have been drawn?
  11. Wow! I've been so stupid! Totally forgot the GUICtrlSetPos Command! >.< Replacing my "GUICtrlSetGraphic" with this: GUICtrlSetPos($drawinggui,100 + $side, 100 + $up) Did the job! Still need to resize it tho!
  12. I'm unable to resize my Graphic?
  13. I see thank you for your help!
  14. Read please, cuz you function does what i want it to, but it keeps showing after do a "GUISetState(@SW_HIDE)"
  15. Also it seems you can't use buttons if you use the transparrent thingy.. #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <WinAPI.au3> $hGUI = GUICreate("New GUI", 300, 200, -1, -1, -1, $WS_EX_LAYERED) GUISetBkColor(0x0000F4) $Pic1 = GUICtrlCreatePic(@ScriptDir & "\test2.bmp", 0, 0, 300, 200) GUICtrlSetState($Pic1, $GUI_DISABLE) ControlSetTrans(-1, 175) _WinAPI_SetLayeredWindowAttributes($hGUI, 0x0000F4) GUISetState(@SW_SHOW) $test = GUICtrlCreateButton("Hide", 100, 50) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $test MsgBox(0, "HA", "HA") EndSwitch WEnd Func ControlSetTrans($iCtrlID, $iTrans = 255, $iDisable = 0) Local $pHwnd, $hWnd, $aPos $hControl = GUICtrlGetHandle($iCtrlID) If $hControl = 0 Then Return SetError(1, 0, 0) If $iDisable Then GUICtrlSetState($iCtrlID, $GUI_DISABLE) $pHwnd = _WinAPI_GetParent($hControl) If @error Then Return SetError(2, 0, 0) $aPos = ControlGetPos($pHwnd, "", $hControl) If @error Then Return SetError(3, 0, 0) $hWnd = GUICreate("", $aPos[2], $aPos[3], $aPos[0], $aPos[1], $WS_POPUP, BitOR($WS_SYSMENU, $WS_EX_MDICHILD), $pHwnd) _WinAPI_SetParent($hControl, $hWnd) If @error Then Return SetError(4, 0, 0) ControlMove($hWnd, "", $hControl, 0, 0) WinSetTrans($hWnd, "", $iTrans) GUISetState(@SW_SHOW, $hWnd) GUISwitch($pHwnd) Return $hWnd EndFunc Also i tried what was posted here. And that doesn't work either :-/ That is not even getting transparrent.
  16. Or not! :-/ If you at some point do GUISetState(@SW_HIDE) The transparrent area will still show.
  17. This allows me to make a GUI and make the background transparrent, and place a picture on it. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <WinAPI.au3> #include <ColorConstantS.au3> $Form1 = GUICreate("Form1", 200, 200, 663, 317, -1, $WS_EX_LAYERED) GUISetBkColor(0x0000F4) GUICtrlCreateGraphic(0, 100, 200, 1) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(0, 50, 200, 1) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(0, 150, 200, 1) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(100, 0, 1, 200) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(50, 0, 1, 200) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(150, 0, 1, 200) GUICtrlSetBkColor(-1, 0x000000) $Pic1 = GUICtrlCreatePic("C:\Users\Toft\Desktop\dot.bmp", 50, 50, 100, 100) _WinAPI_SetLayeredWindowAttributes($Form1, 0x0000F4) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd But i was wondering is there is any way to make the picture it self 40-50% transparent?
  18. Yea thank you!
  19. There is 2-3things i dont fully understand about this. $hGUI is the GUI. $cText is the text which is being centered. WinMove, just moves the GUI. But your call function. "_Centre_Label($hGUI, $cText)" Why the "($hGUI, $cText)" part? And the function it self. This part "($hWnd, $cID)" And what is "$cID" because i can't see it being pre defined? And it's called 3times. I'm sorry to bother you, but i like to fully understand the code i use
  20. I've been trying to find the center of my GUI, but it seems WinGetClientSize, dont work as i hoped :-/ #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $form1 = GUICreate("Center Test", 500, 500) GUISetState(@SW_SHOW) WinMove($form1, "", 400, 400) $aClientSize = WinGetClientSize($form1) $text = GUICtrlCreateLabel("Center", $aClientSize[0] /2, $aClientSize[1] /2) Sleep(1000) MsgBox(0, "Resizing", "Resizing the GUI") WinMove($form1, "", 400, 400, 450, 450) $aClientSize = WinGetClientSize($form1) GUICtrlSetPos($text, $aClientSize[0] /2, $aClientSize[1] /2) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd The problem is that the label's text has to be removed on the x/y, but if i do that by hand and you resize the GUI, it will be off again. So I'm hoping you guys know a soild way of finding the center of GUI and create a label, but then calculate the label size and move it to the center.
  21. Thank you! I didn't know of that function!
  22. Is it possible to do graphic which isn't like: "---" or "|" Like on this picture: Im able to do the box, but the graphic inside it, can you do that in AutoIT?
×
×
  • Create New...