Jump to content

ctyankeeinok

Active Members
  • Posts

    59
  • Joined

  • Last visited

Everything posted by ctyankeeinok

  1. I found the answer elsewhere. No command line interface, but it can be done through the registry. Below are the entries for both local and remote. To turn it back on, just set it to 1: RegWrite("HKEY_CURRENT_USER\Printers\Settings","EnableBalloonNotificationsRemote","REG_DWORD",0) RegWrite("HKEY_CURRENT_USER\Printers\Settings","EnableBalloonNotificationsLocal","REG_DWORD",0)
  2. I am working on an automated printer installation program and I would like to disable the "Show Informational Notifications" settings on the Print Server Properties. Does anyone know how to do that via command line? I know how to do it using the GUI, but I cannot even figure out how I could automate that (command line is much more preferable).
  3. Thanks JohnOne. That is pretty interesting, but I am trying to solve a different problem. I am installing devices and I have to finish their configuration via Device Manager. So, I have to find them in the tree view and then update drivers, change ports, etc.
  4. And, to answer my own question again, I need to put the following at the top of my script.... Argh... I sure wish SciTE defaulted to x64. Someone please correct me if I am heading down the wrong path. Hopefully this helps someone else as well.... #AutoIt3Wrapper_UseX64=Y
  5. I think I figured it out, but it presents another question. I was testing the script by using F5 (Go), in my SciTE editor. Apparently it runs the script as x86 and not x64. If I compile the script as x64, it works properly. So, my question now becomes, how do I get SciTE to run it as x64? I am running SciTE 3.2.0 from June 9, 2012.
  6. I am trying to use the GetText option in the ControlTreeView function on the Device Manager. The intention of the code is to go through the entries until the desired device is found. The code traverses the tree view with no problems, but when I attempt the GetText, an error is returned with no results. How do I make GetText work? I have done this before on XP with no problem, but I have either made a dumb mistake or GetText operates differently on Windows 7. I simplified this example to just look for a common USB Input Device. $strDevice = "USB Input Device" $foundDevice = False Run("mmc devmgmt.msc") WinWaitActive("Device Manager") ControlFocus("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]") ; Device may appear in Root, Other Devices, or Ports, Keyboard, or somewhere else... We will look in each category $tcount = ControlTreeView("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]","GetItemCount","#0") MsgBox(0,"tcount","Node Count: "& $tcount) for $x = 0 To ($tcount - 1) step 1 ControlTreeView("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]","Expand","#0|#"&$x) $count = ControlTreeView("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]","GetItemCount","#0|#"&$x) $text = ControlTreeView("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]","GetText","#0|#"&$x) MsgBox(0,"count","Sub Item count: " & $count & " Node: " & $text) for $i = 0 to ($count - 1) step 1 $text = ControlTreeView("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]","GetText","#0|#"&$x&"|#"&$i) $errvar = @error MsgBox(0,"Error or Text?", "Node/SubItem: " & $x &"/" & $i & " Error: " & $errvar & " Text: " & $text) if @error = 1 Then ExitLoop Else if StringInStr($text,$strDevice) > 0 Then $foundDevice = True ControlTreeView("Device Manager","Device Manager on local computer","[CLASSNN:SysTreeView321]","Select","#0|#"&$x&"|#"&$i) ExitLoop 2 ; found it, now exit both loops EndIf EndIf Next Next
  7. Try this page. It has all of the command settings for the RUNDLL32 PRINTUI.DLL,PrintUIEntry command. I did not see defaults, but you can display properties and preferences. http://technet.microsoft.com/en-us/library/ee624057(v=ws.10).aspx
  8. I am using AutoIT to automate the installation of a USB bar code scanner. Because there does not seem to be a reliable silent installation, I am automating the install process. I have found that when I use the WinWaitActive and similar commands which look for a window title and subtitle, the title of the window does not seem to always matter. For example, depending on the machine I am installing on, I may see "New Hardware Found Wizard" or "Hardware Update Wizard" as the title. However, the script commands will execute with the former when the latter is what is coded in the Title entry. Does anyone have any insight into this?
  9. If you use the window info tool, you can obtain the window title and the visible text fo the control. Activate the window and do a control Send. Since it is a message box, you won't need a control ID WinActivate("Windows Internet Explorer","OK") ControlClick("Windows Internet Explorer","OK","","Primary")
  10. Just a syntax error on the Switch statement. The expression after the Switch keyword declares what to evaluate. By putting $msg = [xxx] in each case, you are assigning $msg to [xxx] and causing a true condition. regardless of which condition was first (after the close) it would be evaluated as true. remove the $Msg = as below. Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $button_1 start() Case $radio_4 $Fast = False Case $radio_2 $Bless = False Case $button_2 ControlMove($client, "", "", 0, 0, 800, 600) EndSwitch
  11. Try using StringRegExpReplace. you will need to know if you are dealing with @CR, @LF or @CRLF. $newText = StringRegExpReplace($text, @CRLF, " ",1)) Will replace the first @CRLF in the $text with a space. For example: $text = "Hello" & @CRLF & "my name is " & @CRLF & "Inigo Montoya" MsgBox(0,"", $text) $newText = StringRegExpReplace($text, @CRLF, " ", 1) MsgBox(0,"", $newText)
  12. Just a guess, but try using the ID (1495) instead of the class identifier. I have had trouble with the class identifier in the past.
  13. PSaltyDS - Thanks for the correction/clarification on the boolean - I learned a new thing. I still don't see how it would work properly with the missing EndIf.
  14. Upon further review, try the following: WinActivate ("iMedic Explore") ControlClick("iMedic Explore", "", "[TEXT:Logout]","Primary") Also, the _GUICtrlButton_Click does not return anything, so your $SuccessFailCode will not tell you anything of value.
  15. Try changing the control identifier to only "[Text:Logout]" - remove the rest.
  16. and another... StringInStr returns a position (integer), not a boolean
  17. Two problems: 1. I think you are missing an EndIF on the If @error line. 2. @error is not a boolean.
  18. yeah - problem between the keyboard and chair. I hit tab then enter - forgetting I ws not in an editor (and not paying attention to the screen. I just cleaned it up.
  19. You can put a timer on WinWaitActive, but I don't know if that is the right solution for you. For example Run("FooInstaller.exe") WinWaitActive("Foo Software Install","this installs stuff", 10) ; wait 10 seconds to see if something happens If WinActive("Foo Software Install","this installs stuff") = 1 then keep going Else MsgBox(0,"Foo Failure" , "Stupid Install did not work") EndIf That will run your install and then wait 10 seconds for the Window to appear. there may be a more elegant way to do the same.
  20. I am trying to install an HHP 4600 barcode scanner as a serial USB device using a silent install. The rundll32 command does not work at all, so I am trying devcon.exe, which gets close. If I run the following, it installs the driver, but I end up with two instances on two different ports - one properly installed, the other not properly installed: run("devcon.exe install hhpcdc.inf USB\VID_0536&PID_020A") First, when I plug in the scanner, cancel the New Hardware Found wizard, I will see "IT 4600" with a yellow circle and red exclamation mark (device not configured) in the Device Manager. When I run the script above, it installs the scanner, but I end up with two instances on two different ports - one properly installed, the other not properly installed (yellow circle, red exclamation mark). I have tried the above install without plugging in first, but I end up with both entries having the yellow circle/red exclamation mark. How do I get the devcon.exe install to recognize the one entry and associate to the scanner? Am I missing something in the install command string?
  21. Google "registry context menu modify".
  22. I defer to PsaltyDS, but if there are multiple controls on the window, there is no guarantee that what you send will be applied to the desired control. You say that you cannot identify the control? If you drag the bullseye over the SQL window, what appears in the AutoIT window information tool? I don't know for certain that you will be able to accomplish what you want to do. I tried a similar action with TOAD. I was able to enter a query, but I could not get it to execute. So, you may have to find a plan B.
  23. Here is an outline of what I understand of your request... $handle = WinGetHandle("title of current window to save") WinActivate("title of second window","") ...actions on second window... WinSetState("title of second window","subtitle",@SW_MINIMIZE) WinActivate($handle)
  24. 1. You have to identify a control, not just a window, to receive the text. Open the AutoIt Window Info tool, click the Control tab, then drag the bullseye over the desired control. That will give you the ID, text, and other info for the control. The control is identified in the third parameter of the controlSend function. chances are that the control ID may change depending on how many SQL windows are appearing. It can get tricky. you will need to figure out which descriptor for the control will remain constant. 2. Minimize the SQL Server window after you login. 2. Even if you do the ControlSend for typing the query, you may have problems getting it to execute. sometimes working with minimized windows can be tricky. I would search the forum for related posts.
  25. Are you trying to send this command without starting the Microsoft SQL Server GUI?
×
×
  • Create New...