Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/19/2015 in all areas

  1. Exit

    about WMI

    Sometimes WMI is not started. Just use this Code to restart WMI: $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") If @error Then RunWait(@ComSpec & ' /c net start winmgmt ', '', @SW_HIDE) RunWait(@ComSpec & ' /c net continue winmgmt ', '', @SW_HIDE) $oWMI = ObjGet("winmgmts:\\" & @ComputerName & "\root\CIMV2") EndIf like I have done it in my _SingleScript() UDF.
    2 points
  2. LAST VERSION - 1.1 18-May-12 Control Viewer (CV) is a replacement of AutoIt Window Info with a number of advantages. I tried to stick to the interface of the last, so you almost do not have to be retrained. During testing, I never managed to find any controls that could not be identified by CV (on the contrary, shows a lot of hidden controls, especially for the system windows). The all program settings are stored in the following registry key: HKEY_CURRENT_USERSoftwareY'sControl Viewer The main differences CV from AWI Shows the complete list of all existing controls for the window that are interested (visible, hidden and deleted controls are displayed with different colors that can be changed to any other).Dynamically changing information during search for the windows and their controls.Ability to quickly switch between controls in the list.Ability to show/hide any controls from the list (useful for the overlaping controls).Information for the Style and ExStyle parameters shown in the form of hexadecimal values​​, and as its flags.Added the PID and Path parameters in the Window tab and ability to quickly open a folder that containing the process file.Added the coordinate system relative to the selected control.Shows a color of the selected pixel in RGB and BGR formats.Shows an example fill of the selected color.Ability to select the text encoding (affects the Text parameter in the Control tab).The complete change the appearance of pop-up frame for the selected controls.Simple and convenient tool to get a screenshot of the part screen of interest for publication on the forum (Capture tab).Create a report in the clipboard or a text file for subsequent publication on the forum.Search all running AutoIt scripts and their windows in the system (AutoIt tab).User-friendly interface. Used shortcuts Ctrl+Alt+T - Enable/Disable "Always On Top" mode (also available from the menu). Ctrl+Alt+H - Enable/Disable highlight selected controls (also available from the menu). Ctrl+A - Select all text (works in any input field). Ctrl - Hold down when moving the mouse to scroll the screenshot (Capture tab). Shift - Hold down when stretching/compression of the contour frame for an equilateral resizing screenshots (Capture tab). DoubleClick (on the screenshot) - Save the image to a file (Capture tab). DoubleClick (on any list item) - Open a folder with the file of the process or AutoIt script (AutoIt tab). Del (on any list item) - Close process (AutoIt tab). F5 - Updating the list (AutoIt tab). If anyone have any questions or comments about CV, please post it in this thread. I will be glad to any feedback and suggestions. Files to download Binary (x86 and x64) Redirection to CV_bin.zip, 1.14 MB CV_bin.html Source Redirection to CV_source.zip, 691 KB CV_source.html
    1 point
  3. czardas

    Undefined Function

    Undefined User!
    1 point
  4. iamtheky

    about WMI

    ...unless deliberately disabled, or dubiously defunct; it will be there.
    1 point
  5. mLipok

    about WMI

    As I remember I read it before (2 years ago). This is nice refresh of knowledge. mLipok
    1 point
  6. jguinch

    about WMI

    For my part, I met 3 or 4 problems with WMI and Windows XP. Each time, I solved it by rebuilding the WMI repository. Here is a good article : http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx
    1 point
  7. Melba23

    return variable index

    autohit, Welcome to the AutoIt forums. I would just search the first array for a match like this: #include <GUIConstantsEx.au3> #include <Array.au3> Global $array1[] = ["A1", "B1", "C1"] Global $array2[] = ["A2", "B2", "C2"] Global $array3[] = ["A3", "B3", "C3"] Global $array4[] = ["A4", "B4", "C4"] $hGUI = GUICreate("Test", 500, 500) $combo_box = GUICtrlCreateCombo("", 10, 10, 200, 20) GUICtrlSetData($combo_box, _ArrayToString($array1)) $inputbox1 = GUICtrlCreateInput("", 10, 200, 200, 20) $inputbox2 = GUICtrlCreateInput("", 10, 250, 200, 20) $inputbox3 = GUICtrlCreateInput("", 10, 300, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $combo_box $iIndex = _ArraySearch($array1, GUICtrlRead($combo_box)) GUICtrlSetData($inputbox1, $array2[$iIndex]) GUICtrlSetData($inputbox2, $array3[$iIndex]) GUICtrlSetData($inputbox3, $array4[$iIndex]) EndSwitch WEndPlease ask if you have any questions. M23
    1 point
  8. Ahem Danyfirex said it, though I repeat ... <<<<< The WinWaitActivate() func doesn't exist ! >>>>>
    1 point
  9. JohnOne

    Undefined Function

    Someone once wrote "If you want help with a picture, post a picture, if you want help with code, post code" Don't worry you can alter your super secret redacted text.
    1 point
  10. When did AutoIt become PHP?
    1 point
  11. Allow2010

    WinHTTP functions

    after taking a closer look at the code of _WinHttpSimpleFormFill i figured out most of it myself...its a bit complicated, the short version: the content of the file has to be added not just the filename...WinHttpSimpleFormFill does the job well, so i keep it that way :-)
    1 point
  12. JLogan3o13

    about WMI

    I encountered what boththose is referencing in a hospital client a year or so ago. Had a script that relied heavily on WMI but was something they'd turned off through their hardening process. I think it is still an exception to the rule, however, as I see it enabled in 99% of the places I work.
    1 point
  13. spudw2k

    net user

    User profile allows specifying an alternate path for where the profile directory is stored if you want it changed from the default (useful for storing profiles on secondary partition or network share). Home directory is an "auto drive map" essentially. It allows for a user share drive to be defined and mapped when the user logs in. It is common in enterprise environments to host a U: (or user drive) and a P: (public drive) share folders. The U: drive is often defined when the user account is created.
    1 point
  14. spudw2k

    net user

    https://support.microsoft.com/en-us/kb/251394 /expires:{date | never} /passwordchg:{yes | no}
    1 point
  15. iamtheky

    about WMI

    That service is also intentionally disabled by many STIGs, with no rights available to a script to turn it on. I think the latest Gold Disc even contains the powershell package, the feature is just not enabled and installed by default. But (when dealing with hardened envrionments) I would assume neither were available and aim for the registry, or offline package install and reimage.
    1 point
  16. JohnOne, No, you only create a Map (using the Beta) when you declare with empty [ ] and no data: Both Arrays and Maps use similar syntax, so care is required to ensure the variable is of the correct datatype - this is determined by the first declaration line for the variable: Using empty [ ] declares a Map: Local $vVar[] ; A Map Filling the [ ] with a dimension size declares an Array: Local $vVar[3] ; An Array Assigning element values when declaring makes the variable an Array - these three lines are functionally equivalent: Local $vVar[3] = [1, 2, 3] ; An Array Local $vVar[] = [1, 2, 3] ; An Array Local $vVar = [1, 2, 3] ; An ArrayThere has been some internal debate as to whether there should be a different syntax for Maps (such as { }) but there is a lot of work that needs to be done to get them working correctly before we ever get to that level of detail. M23
    1 point
  17. Let's move onto You must also declare an array's "no. of elements & dimensions" even if you are assigning it data. Suggestion "If you declare an array that is not created by a function, you must specify its "no. of elements & dimensions" size."
    1 point
  18. mLipok

    about WMI

    I remember that some time ago (maybe two years ago) I had a problem on Win7 such that WMI did not work and then I had to repair Windows. I did not know about it: So I can not say if it was the same case. But thanks @Exit it should be useful.
    1 point
  19. iamtheky

    net user

    its minimum password age. That is the date it becomes changeable.
    1 point
  20. JohnOne

    autoit multithreaded?

    I can tell you what is much harder than writing an IniRead function in VB.net, getting multithreading to work proper in AutoIt.
    1 point
  21. Use Chr(3) instead of 0x03
    1 point
  22. also to split long lines, you can use the underscore sign _ within the IDE: FileWriteLine($sOpenfile, "some text1" & @CRLF & _ "some text2" & @CRLF & _ "some text3" & @CRLF & _ "some text4" & @CRLF & _ "some text5" & @CRLF)
    1 point
  23. I not sure if you mean this: Func _UpdateMenuClock($hWnd, $msg, $iIDTimer, $dwTime) #forceref $hWnd, $Msg, $iIDTimer, $dwTime GUICtrlSetData($cMenu,_now()) WinSetTitle($hChildWin,"",_now()) ;if you mean ChildWin title. EndFunc ;==>_UpdateMenuClockIf you mean a label just set the label control ID. GUICtrlSetData($here_the_label_id_you_want_to_change,_now())
    1 point
  24. For future reference this is an example of how to test which of several different methods is the fastest. #include <FileConstants.au3> RunTests() Func RunTests() Local $sOpenfile = "c:\Temp\TessFile.txt" Local $Method1Timer = 0 Local $Method2Timer = 0 Local $Method3Timer = 0 $Method1Timer = TimerInit() Method1Test($sOpenfile) ConsoleWrite("Method 1 took " & TimerDiff($Method1Timer) & " milliseconds" & @CRLF ) $Method2Timer = TimerInit() Method2Test($sOpenfile) ConsoleWrite("Method 2 took " & TimerDiff($Method2Timer) & " milliseconds" & @CRLF ) $Method3Timer = TimerInit() Method3Test($sOpenfile) ConsoleWrite("Method 3 took " & TimerDiff($Method3Timer) & " milliseconds" & @CRLF ) EndFunc Func Method1Test($sOpenfile) FileWriteLine($sOpenfile,"some text1") FileWriteLine($sOpenfile,"some text2") FileWriteLine($sOpenfile,"some text3") FileWriteLine($sOpenfile,"some text5") FileWriteLine($sOpenfile,"some text6") FileWriteLine($sOpenfile,"some text7") FileWriteLine($sOpenfile,"some text8") FileWriteLine($sOpenfile,"some text9") FileWriteLine($sOpenfile,"some text10") EndFunc Func Method2Test($sOpenfile) FileWriteLine($sOpenfile,"some text1" & @CRLF & "some text2" & @CRLF & "some text3" & @CRLF & "some text4" & @CRLF & "some text5" & @CRLF & "some text6" & @CRLF & "some text7" & @CRLF & "some text8" & @CRLF & "some text9" & @CRLF & "some text10") EndFunc Func Method3Test($sOpenfile) Local $hFileHandel = FileOpen($sOpenfile,$FO_OVERWRITE+$FO_CREATEPATH ) FileWriteLine($hFileHandel,"some text1") FileWriteLine($hFileHandel,"some text2") FileWriteLine($hFileHandel,"some text3") FileWriteLine($hFileHandel,"some text4") FileWriteLine($hFileHandel,"some text5") FileWriteLine($hFileHandel,"some text6") FileWriteLine($hFileHandel,"some text7") FileWriteLine($hFileHandel,"some text8") FileWriteLine($hFileHandel,"some text9") FileWriteLine($hFileHandel,"some text10") FileClose($hFileHandel) EndFunc
    1 point
  25. In fairness, I'd despair if someone who can write an AutoIt script or even know what a script is, that could not find a mainstream and well supported language that can do everything AutoIt can and more, while supporting multithreading. People are disappointed when they learn there is no support for it, but that's all it is disappointment. You can spend 6 weeks trying to multithread in AutoIt or you can spend 6 weeks learning C++ or C# etc...
    1 point
  26. @ChaitanyaK intresting question. Working on example.
    1 point
  27. I'm posting the code here frank(we spoke on msn earlier): #include <GUIConstants.au3> $Form1 = GUICreate("Form1", 633, 447, 193, 125, -1, -1, WinGetHandle("Program Manager")) ; <-- creating the window as a child of another window will remove it's entry in the task bar GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
    1 point
×
×
  • Create New...