
GraaF1337
Active Members-
Posts
104 -
Joined
-
Last visited
Everything posted by GraaF1337
-
GUICtrlCreateList Center Text?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
How does this help me in anyway? I want to center the text inside the list? o.O -
I'm seem to be unable to center the text in a "GUICtrlCreateList"? Tried "$SS_CENTER" that didn't work?
-
CPU Useage? | Suspend process
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
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 >.< -
CPU Useage? | Suspend process
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
I know how to close, kill processes and such. I need to know how to suspend it, so i can resume it later on ^^ -
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 ^^
-
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
Facking love you sometimes! Thank you alot! -
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
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 -
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
Fixed and sorry >.< -
Operations in invisible window
GraaF1337 replied to saseta00's topic in AutoIt General Help and Support
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 -
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
Any ideas? -
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
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 -
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
I'm unable to resize the graphic? Understand me right, i want to make the graphic bigger after it have been drawn? -
GUICtrlSetGraphic Wont work? | Resizing Graphic?
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
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! -
I see thank you for your help!
-
Read please, cuz you function does what i want it to, but it keeps showing after do a "GUISetState(@SW_HIDE)"
-
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.
-
Or not! :-/ If you at some point do GUISetState(@SW_HIDE) The transparrent area will still show.
-
Perfect!
-
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?
-
Yea thank you!
-
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
-
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.
-
Lines | GUICtrlCreateGraphic
GraaF1337 replied to GraaF1337's topic in AutoIt General Help and Support
Thank you! I didn't know of that function! -
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?