Zedna Posted June 7, 2007 Posted June 7, 2007 (edited) In Delphi it's done by Application.Title := 'Something'; I need this for my Autoit GUI application which will be running with it's GUI at background or minimized and I want to have in application title on taskbar icon for that app some quick read informations. Please point me to some related API functions/structures so I could make it. I don't know where to start and search on forum didn't help me too. Edited June 7, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
PaulIA Posted June 8, 2007 Posted June 8, 2007 In Delphi it's done by Application.Title := 'Something'; I need this for my Autoit GUI application which will be running with it's GUI at background or minimized and I want to have in application title on taskbar icon for that app some quick read informations. Please point me to some related API functions/structures so I could make it. I don't know where to start and search on forum didn't help me too.Delphi creates a hidden form (TApplication) that contains the application title. The program's main form contains the caption that you see when the app is running. To see this, create a new app and set Application.Title to 'Something' right before Application.Run. Leave the default form caption set to 'TForm1'. Run the application and then run WinSight. You'll see that there is an invisible TApplication instance running with a title of 'Something' and a visible TForm1 instance that is running with a caption of 'TForm1'. Just one of the wonders of Delphi. Auto3Lib: A library of over 1200 functions for AutoIt
Zedna Posted June 8, 2007 Author Posted June 8, 2007 Delphi creates a hidden form (TApplication) that contains the application title. The program's main form contains the caption that you see when the app is running. To see this, create a new app and set Application.Title to 'Something' right before Application.Run. Leave the default form caption set to 'TForm1'. Run the application and then run WinSight. You'll see that there is an invisible TApplication instance running with a title of 'Something' and a visible TForm1 instance that is running with a caption of 'TForm1'.Just one of the wonders of Delphi. I know about that "hidden" Delphi's window (with size 0,0) which represent Application. There are also scripts to visualise it (set visible and some bigger size). So is it something like this possible also in Autoit? Resources UDF ResourcesEx UDF AutoIt Forum Search
kjactive Posted June 8, 2007 Posted June 8, 2007 "hidden" windows - why not just place the application off the screen visual area just a thought kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc...
PaulIA Posted June 8, 2007 Posted June 8, 2007 I know about that "hidden" Delphi's window (with size 0,0) which represent Application. There are also scripts to visualise it (set visible and some bigger size). So is it something like this possible also in Autoit?You'd have to create an "application" window that's hidden all the time and then create another "form" window that has the application window as it's parent. I'm guessing you could do the same thing in AutoIt, but it sounds like a lot of work to replicate one Delphi feature. Auto3Lib: A library of over 1200 functions for AutoIt
Zedna Posted June 8, 2007 Author Posted June 8, 2007 You'd have to create an "application" window that's hidden all the time and then create another "form" window that has the application window as it's parent. I'm guessing you could do the same thing in AutoIt, but it sounds like a lot of work to replicate one Delphi feature. After kjactive post I did think about exactly the same.I will try it. I wonder if I must also synchronize all minimize/restore/... events between these two windows.I will post here some test scripts later...Thanks all for suggestions. Resources UDF ResourcesEx UDF AutoIt Forum Search
Zedna Posted June 8, 2007 Author Posted June 8, 2007 (edited) Here is what I did. It really has visual bugs with minimize/restore as I expected. I did some workarounds so result is quite good. Note: I must make hidden window at least 1x1 pixel because with 0x0 pixel it will not be on the taskbar. Also in WM_MOVE event I couldn't get position from wParam so I used WinGetPos() expandcollapse popup#NoTrayIcon #include <GUIConstants.au3> #include <Misc.au3> Global Const $WM_SYSCOMMAND = 0x0112 Global Const $SC_MINIMIZE = 0xF020 Global Const $SC_RESTORE = 0xF120 Global Const $WM_MOVE = 0x3 ;~ Global Const $WM_SIZE = 0x05 $app = GUICreate("Application title", 1, 1,-1,-1,$WS_POPUP) GUISetState(@SW_SHOW, $app) $gui = GUICreate("Form title", 300, 200, -1, -1, -1, -1, $app) GUISetState(@SW_SHOW, $gui) GUIRegisterMsg($WM_SYSCOMMAND, "WM_SYSCOMMAND") GUIRegisterMsg($WM_MOVE, "WM_MOVE") Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Func WM_SYSCOMMAND($hWnd, $Msg, $wParam, $lParam) Switch $wParam Case $SC_MINIMIZE _SendMessage($app, $WM_SYSCOMMAND, $SC_MINIMIZE, 0) GUISetState(@SW_HIDE, $gui) Return 0 Case $SC_RESTORE _SendMessage($app, $WM_SYSCOMMAND, $SC_RESTORE, 0) GUISetState(@SW_SHOW, $gui) Return 0 EndSwitch Return $GUI_RUNDEFMSG EndFunc Func WM_MOVE($hWnd, $Msg, $wParam, $lParam) ;~ If $hWnd = $gui Then $pos = WinGetPos($gui) WinMove($app, '', $pos[0], $pos[1]) ;~ ConsoleWrite('wparam:' & $wParam & ' x:' & $pos[0] & ' y:' & $pos[1] & @CRLF) ;~ WinMove($app, '', _LoWord($wParam), _HiWord($wParam)) ;~ ConsoleWrite('wparam:' & $wParam & ' x:' & _LoWord($wParam) & ' y:' & _HiWord($wParam) & @CRLF) ;~ EndIf Return $GUI_RUNDEFMSG EndFunc Func _HiWord($x) Return BitShift($x, 16) EndFunc Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc Edited June 8, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
Balmukundam Posted April 8, 2016 Posted April 8, 2016 Hii I'm new to this tool and wanting to run my vbscript file without Doing any changing is it possible ? if not then please suggest....
AutoBert Posted April 8, 2016 Posted April 8, 2016 (edited) Did you looked on last responce date? Which tool? Did you know: this is not a vbscript forum? Edited April 8, 2016 by AutoBert
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