CodyBarrett Posted May 13, 2009 Share Posted May 13, 2009 (edited) well... i was bored.. and did some research on the forums... couldn't find much... and the stuff i DID find was like... dllcall and complex stuff THEN i found something alittle more simple haha check this out... expandcollapse popup#NoTrayIcon #include <Misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> HotKeySet ('{ESC}', '_Exit_') HotKeySet ('+{DEL}', '_Show_TM_') Opt ('GUIoneventmode',1) $Gui = GUICreate (@ScriptName, 200,100, -1, -1, -2138570616) GUISetBkColor (0xFFFFA2, $Gui) $lStatus = GUICtrlCreateLabel ('', 1, 1, 198,98, $SS_CENTER) GUICtrlSetBkColor (-1, 0x000000) GUICtrlSetFont (-1, 60, '', '', 'Fixedsys') GUICtrlSetColor (-1, 0xFFFFA2) GUICtrlSetOnEvent (-1, '_Win_Move_') GUISetOnEvent ($GUI_EVENT_CLOSE,'_exit_',$Gui) GUISetState() WinSetTrans ($Gui, '', 50) WinSetOnTop ($GUI, '', 1) Run(@SystemDir & '\taskmgr.exe', '', @SW_HIDE) While 1 $iStatus = StatusbarGetText ('Windows Task Manager', '', 2) GUICtrlSetData ($lStatus, StringTrimLeft ($iStatus, 10)) Sleep (300) If Not ProcessExists ('Taskmgr.exe') Then Run(@SystemDir & '\taskmgr.exe', '', @SW_HIDE) WEnd Func _Win_Move_ () $MouseXY = MouseGetPos () $WinXY = WinGetPos ($Gui) $xOff = $MouseXY[0] - $WinXY[0] $yOFF = $MouseXY[1] - $WinXY[1] While _IsPressed ('01') WinMove ($Gui, '',MouseGetPos (0) - $xOff ,MouseGetPos (1) - $yOFF) Sleep (100) WEnd EndFunc Func _Show_TM_ () WinSetState ('Windows Task Manager', '', @SW_SHOW) EndFunc Func _Exit_ () ProcessClose ("TaskMgr.exe") Exit EndFunc Edited May 13, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Mat Posted May 13, 2009 Share Posted May 13, 2009 (edited) What happens if I start the script and then want to access task manager? Or any time after that for that matter! I am now running my computer task manager less, so at least exit it in your exit function... CODE#include <Misc.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #NoTrayIcon HotKeySet ("{ESC}", "_Exit_") Opt ("GUIoneventmode", 1) $Gui = GUICreate (@ScriptName, 200,100, -1, -1, -2138570616) GUISetBkColor (0xFFFFA2, $Gui) $lStatus = GUICtrlCreateLabel ("", 1, 1, 198,98, $SS_CENTER) GUICtrlSetBkColor (-1, 0x000000) GUICtrlSetFont (-1, 60, "", "", "Fixedsys") GUICtrlSetColor (-1, 0xFFFFA2) GUICtrlSetOnEvent (-1, "_Win_Move_") GUISetOnEvent ($GUI_EVENT_CLOSE, "_exit_", $Gui) GUISetState () WinSetTrans ($Gui, "", 50) WinSetOnTop ($GUI, "", 1) Run (@SystemDir & "\taskmgr.exe", "", @SW_HIDE) While 1 $iStatus = StatusbarGetText ("Windows Task Manager", "", 2) GUICtrlSetData ($lStatus, StringTrimLeft ($iStatus, 10)) Sleep (300) If Not ProcessExists ("Taskmgr.exe") Then Run(@SystemDir & "\taskmgr.exe", "", @SW_HIDE) WEnd Func _Win_Move_ () $MouseXY = MouseGetPos () $WinXY = WinGetPos ($Gui) $xOff = $MouseXY[0] - $WinXY[0] $yOFF = $MouseXY[1] - $WinXY[1] While _IsPressed ('01') WinMove ($Gui, '',MouseGetPos (0) - $xOff ,MouseGetPos (1) - $yOFF) Sleep (100) WEnd EndFunc ; ==> _Win_Move_ Func _Exit_ () ProcessClose ("TaskMgr.exe") Exit EndFunc ; ==> _Exit_ MDiesel Edited May 13, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 13, 2009 Author Share Posted May 13, 2009 (edited) that would work too... or just double click on the icon in the taskbar?? that brrings it up for me everytime EDIT on my home computer it does not on all.. so yeah i added [sHIFT] + [DEL] to show the taskt manager while in use... and the processclose you suggested mDiesel Edited May 13, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Mat Posted May 13, 2009 Share Posted May 13, 2009 No icon in the taskbar for me... did you have it running already? I've been running for ages now, its pretty neat! MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
GEOSoft Posted May 13, 2009 Share Posted May 13, 2009 Don't forget that you can always bring up the task manager with Shift+Ctrl+Esc Send("+^{ESC}") George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 13, 2009 Author Share Posted May 13, 2009 (edited) the taskmanager icon in the taskbar... and Geosoft.. i just added [sHIFT] + [DEL] to bring it up.. your code doesn't work.. thanks to Mdiesel for the idea Edited May 13, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Mat Posted May 13, 2009 Share Posted May 13, 2009 Geosoft, normally you can... But after running his (Original) script - no. I run a simple process close on it and i can run it again. Cody saw sense in the end though EDIT on my home computer it does not on all.. so yeah i added [sHIFT] + [DEL] to show the taskt manager while in use... and the processclose you suggested mDiesel Much Better One other thing, I know you can't solve it either... Task manager always leaves the status bar blank for the first few seconds after opening. So I just get flickering for a bit... I am actually getting to like this script, and I am probably going to use it a lot. I don't know why though! MDiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
CodyBarrett Posted May 13, 2009 Author Share Posted May 13, 2009 thank you.. and its because i didn't originaly set the status to 0%... but yeah a simple fix.. doubt it if i will do it though.. to lazy just for 2 characters... haha i find it usefully.. because its transparent and movable [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now