Guest irata Posted December 9, 2003 Posted December 9, 2003 AutoIt runs absolutely *perfect* for what I need, except for one thing - the taskbar button. I'm trying to execute an AutoIt script while within a full-screen application in Windows XP. But whenever I execute the AutoIt script, the creation of the taskbar icon momentarily returns focus to windows and crashes my full-screen application (If it loses focus, it crashes). I've tried completely disabling the taskbar, but that still does not work - whenever the script creates an icon, my program crashes. Also, I've made sure that it is the TaskBar icon is responsible for this problem by writing a dummy application that does not create a taskbar icon - it works fine. So, the question is: Is there any way to make it so that an AutoIt script (or an executable) does not create a taskbar icon? I looked at the source code, and I found the following comments under Aut2exe.cpp: * ToolBars * - Using icons from the system built in toolbar in commctrl * - Create using CreateToolBarEx and TBBUTTON array with IDs assigned * from a previously created menubar * - WM_NOTIFY used to set tooltips * - Tooltip text, is same as command ID+1 - see resource.h But, I couldn't find CreateToolBarEx or TBBUTTON declared anywhere in the program. Does anyone have any ideas, or helpful suggestions? Thanks so much, - Irata
CyberSlug Posted December 9, 2003 Posted December 9, 2003 (edited) Look in \autoit\src\application.cpp Located around line 158 is: // Display the tray icon CreateTrayIcon(g_hWnd); /* from Application.cpp */ void AutoIt_App::WindowCreate(void) { ////HMENU hSysMenu; g_hWnd = CreateWindow( AUT_APPCLASS, AUT_APPTITLE, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 625, 300, NULL, NULL, g_hInstance, NULL); // Add read-only edit control to our main window g_hWndEdit = CreateWindow("edit", NULL, WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL | WS_BORDER | ES_LEFT | ES_MULTILINE | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_READONLY, 0, 0, 0, 0, g_hWnd, (HMENU)1, g_hInstance, NULL); AUT_ASSERT(g_hWndEdit != NULL); // Display the tray icon ////CreateTrayIcon(g_hWnd); // Create our additions to the system menu ////hSysMenu = GetSystemMenu(g_hWnd, FALSE); //AppendMenu(hSysMenu, MF_SEPARATOR, 0, NULL); //AppendMenu(hSysMenu, MF_STRING, IDM_SYS_PAUSE, "Pause Script Execution"); //ShowWindow(g_hWnd, SW_MINIMIZE); ////ShowWindow(g_hWnd, SW_HIDE); //ShowWindow(g_hWnd, SW_NORMAL); } // CreateWindow() Edit: Comment out the lines with the four slashes. Build the project to generate new versions of AutoIt.exe and AutoIt.bin Edited December 9, 2003 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Guest irata Posted December 9, 2003 Posted December 9, 2003 Thanks so much for you help! Everything works fine now
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