Jump to content

ob1kenob

Members
  • Posts

    3
  • Joined

  • Last visited

ob1kenob's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. After turning a hair or two gray, I discovered that whenever I call SplashTextOn with opt containing 32, it does not support multiple lines via ControlSetText calls. Adding this option to the help's example demonstrates this: ;; SMOOTH $message = "" SplashTextOn("TitleFoo", $message, -1, -1, -1, -1, 36, "") For $x = 1 to 20 $message = $message & $x & @LF ControlSetText("TitleFoo", "", "Static1", $message) sleep(100) Next Help alludes to this but doesn't exactly spell it out: For my particular application, I intended to fill the screen up with a message to call the help desk ASAP. I wanted to include a timer that counted down on a single line, very similar to the example, but I preferred the vertically centered option to increase the likelihood that it would be read. Updating it with repeated SplashTextOn calls will probably annoy people enough that they won't read the message If anybody has any input on how to do this without reinventing the wheel, I would be very grateful for your input. If this should be posted as a bug report, mods feel free to move.
  2. If what you say (about numeric ControlIDs vs text "ClassNameNN" ControlIDs) is true, then the help for AutoIt needs to be revised!! Don't get me wrong, I'm siding with you at this point, but the helpfile (Function Reference/Window Management/Controls page) led me in the wrong direction about this, and the helpfile page for ControlGetHandle (Function Reference/Window Management/ControlGetHandle) doesn't mention validity checking either... Perhaps that's why so many programmers have this problem... Who do I direct this info to, to get the helpfile fixed/update/revised? Thanks Paul
  3. Thanks PaulIA for a great library that lets me get the most from AutoIt with the least headache. Two thumbs up! I did run into an error recently with a script I use at work to reconfigure the visual settings on Windows XP machines. The text of the error was: _API_WriteProcessMemory: Only part of a ReadProcessMemory or WriteProcessMemory request was completed. It appeared to be caused by the last few lines of the following code: CODE#region FOLDER OPTIONS ============== ; Start the "Folder Options" dialog Run("rundll32 shell32.dll,Options_RunDLL",@WindowsDir) WinWaitActive("Folder Options","Show common tasks") ; Click the Restore Defaults button ControlClick("Folder Options","Show common tasks",30107) ; Tab over once to get to "View" tab ControlCommand("Folder Options","Show common tasks",12320,"TabRight","") WinWaitActive("Folder Options","You can apply the view") ; Click the Restore Defaults button ControlClick("Folder Options","You can apply the view",30121) ; get a handle to the TreeView in the View tab $hTempTreeView = ControlGetHandle("Folder Options","You can apply the view",30120) ; get a handle to "Automatically search for..." $hNodeA = _TreeView_FindNode($hTempTreeView,"Automatically search for network folders and printers") ; UnCheck "Automatically search for..." _TreeView_SetChecked($hTempTreeView,$hNodeA,False) The funny thing is if I moved this code into it's own au3 file, it wouldn't generate the error. Then I noticed that I had a whole lot of other calls to _TreeView_FindNode and _TreeView_SetChecked before the problem code. I moved the problem code above the other calls, and the error went away. Strange, eh? If it helps any, this is the "other" code/calls: CODE#region TASKBAR AND START MENU ================================================ ; Open the Taskbar and Start Menu dialog Run("rundll32 shell32.dll,Options_RunDLL 1",@WindowsDir) WinWaitActive("Taskbar and Start Menu Properties","You can keep") ; UnCheck "Hide inactive icons" ControlCommand("Taskbar and Start Menu Properties","You can keep",1000,"UnCheck","") ; move to the Start Menu tab ControlCommand("Taskbar and Start Menu Properties","You can keep",12320,"TabRight") WinWaitActive("Taskbar and Start Menu Properties","Select this menu style") ; Select the "Classic Start Menu" radio button (controlID 1133) ControlCommand("Taskbar and Start Menu Properties","Select this menu style",1133,"Check","") #region Customize Classic Start Menu Dialog ; Click on "Customize" button next to "Classic.." ControlClick("Taskbar and Start Menu Properties","Select this menu style",1130) WinWaitActive("Customize Classic Start Menu","To remove records of recently") ; "Advanced Start Menu Options" is a TreeView - we have to get a handle to it $hTreeView = ControlGetHandle("Customize Classic Start Menu","To remove records of recently",1123) ; now get handles to the individual nodes in the treeview $hNodeDisplay_Admin_Tools = _TreeView_FindNode($hTreeView, "Display Administrative Tools") $hNodeDisplay_Favorites = _TreeView_FindNode($hTreeView, "Display Favorites") $hNodeDisplay_Log_Off = _TreeView_FindNode($hTreeView, "Display Log Off") $hNodeDisplay_Run = _TreeView_FindNode($hTreeView, "Display Run") $hNodeEnable_dragging = _TreeView_FindNode($hTreeView, "Enable dragging and dropping") $hNodeExpand_Control_Panel = _TreeView_FindNode($hTreeView, "Expand Control Panel") $hNodeExpand_My_Docs = _TreeView_FindNode($hTreeView, "Expand My Documents") $hNodeExpand_My_Pics = _TreeView_FindNode($hTreeView, "Expand My Pictures") $hNodeExpand_Net_Conns = _TreeView_FindNode($hTreeView, "Expand Network Connections") $hNodeExpand_Printers = _TreeView_FindNode($hTreeView, "Expand Printers") $hNodeScroll_Programs = _TreeView_FindNode($hTreeView, "Scroll Programs") $hNodeShow_Small_Icons = _TreeView_FindNode($hTreeView, "Show Small Icons in Start Menu") $hNodeUse_Personalized_Menus = _TreeView_FindNode($hTreeView, "Use Personalized Menus") ; Now set the respective values _TreeView_SetChecked($hTreeView,$hNodeDisplay_Admin_Tools,False) _TreeView_SetChecked($hTreeView,$hNodeDisplay_Favorites,False) _TreeView_SetChecked($hTreeView,$hNodeDisplay_Log_Off,True) _TreeView_SetChecked($hTreeView,$hNodeDisplay_Run,True) _TreeView_SetChecked($hTreeView,$hNodeEnable_dragging,True) _TreeView_SetChecked($hTreeView,$hNodeExpand_Control_Panel,False) _TreeView_SetChecked($hTreeView,$hNodeExpand_My_Docs,False) _TreeView_SetChecked($hTreeView,$hNodeExpand_My_Pics,False) _TreeView_SetChecked($hTreeView,$hNodeExpand_Net_Conns,False) _TreeView_SetChecked($hTreeView,$hNodeExpand_Printers,False) _TreeView_SetChecked($hTreeView,$hNodeScroll_Programs,False) _TreeView_SetChecked($hTreeView,$hNodeShow_Small_Icons,False) _TreeView_SetChecked($hTreeView,$hNodeUse_Personalized_Menus,False) ; Click OK to the "Customize ..." dialog (controlID 1) ControlClick("Customize Classic Start Menu","",1) #endregion Customize Classic Start Menu Dialog ; Click OK to the main "Taskbar..." dialog (controlID 1) ControlClick("Taskbar and Start Menu Properties","",1) #endregion TASKBAR AND START MENU BTW, I am using the latest version of Scite4AutoIt, AutoIT 3.2.2.0 Prod, and the latest version of Auto3Lib (2007-01-24). Feel free to email me if you want the whole source code/environment/etc to reproduce the problem.
×
×
  • Create New...