A UDF with Extended Functions for Window Management
Fixes WinGetClassList's barbaric returning of a @LF separated string instead of an array.
Automating applications that change their controls' handles/classes on each launch (e.g. half of Cisco's programs)
10/04/2016 (v0.4): _WinGetClassNNList Fixed : Not Returning an Index when using $2D_ARRAY _WinGetClassNNList Fixed : Not Properly returning $aArray[x] on Classes with instances > 9 when using $2D_ARRAY 10/03/2016 (v0.3): _WinGetClassList Added : Exactly the same as WinGetClassList but returns a more civilized Array _WinGetClassNNList Added : Returns Classes and their instances in either a 1D or 2D array depending on Flags _WindowGetHandleList Renamed: _WinGetHandleList SCRIPT BREAKING! _WindowGetHandleListFromPos Renamed: _WinGetHandleListFromPos SCRIPT BREAKING! 10/01/2016 (v0.2): WindowsExConstants.au3 Added : Flags in _WindowGetHandleListFromPos _WindowGetHandleListFromPos Removed: ConsoleWrite left in during debug _WindowGetHandleListFromPos Added : Flag for if part of a Control is at $X, $Y return it as well. 10/01/2016 (v0.1): _WindowGetHandleList Added : Retrieves the handles of classes from a window. _WindowGetHandleListFromPos Added : Retrieves the handles of classes at a specific position from a window. Known and Reported Bugs:
None reported To Do:
To Be Decided. Opinions welcome! Upcoming Changes:
To Be Decided.
Good morning everyone
I was playing a little bit with "Screen Capture" UDF, and I was trying to make a "Window" capture, but, since I made a GUI which through I fire the event "Capture", my GUI is captured as well, and I don't want to
This is the line of code that makes the capture:
_ScreenCapture_CaptureWnd($strScreenCaptureFileName, $objActiveWindow, 0, 0, -1, -1, False) And these are the lines of code which select the "active" window:
Local $objCurrentWindow = 9999 If _IsPressed("01") Then $objCurrentWindow = WinGetHandle("[ACTIVE]") If $objCurrentWindow <> $objMyGUI Then $objActiveWindow = $objCurrentWindow EndIf EndIf Sorry If I made stupid mistakes
Thanks in advance.
Hello I got problem with final program .exe closing on windows 7 ultimate 64bit. It starts , icon shows on toolbar and program exit.
I have seen things like that before but it was caused by AV. There is no AV and UAC and firewall off.
Maybe is there needed any microsoft library or etc or whatever?
I know that this theme was discussed several times but I read all These threats with no helping result.
I have two pieces of TEMPer1F USB Thermometer.
It is a Standard Windows HID device with no add. Driver needed.
With the device I got an App reading from it and showing Graphs and much more and which can handle several devices.
With the Software came also a RDingUSB.dll file handling the communication with the device.
I can call the dll without any error. But the Problem is how to Access the device using the DLL and Access more than one of same VID/PID
by Serial or anything else useful.
I have also sources in c# doing the Job, but no experience in C# to successfuly port it to AutoIT.
So my question: Can anyone help me to realize the simple pull of the temperature value from the devices based on C# source?
The rest to write it to MySQL DB and repeat it etc. is no Problem for me.
The C# part with the DLL functions class:
internal class RDing
public static extern IntPtr OpenUSBDevice(int VID, int PID);
public static extern IntPtr CloseUSBDevice(IntPtr hDevice);
public static extern bool WriteUSB(IntPtr hDevice, byte pBuffer, uint dwBytesToWrite, ref ulong lpNumberOfBytesWritten);
public static extern bool ReadUSB(IntPtr hDevice, byte pBuffer, uint dwBytesToRead, ref ulong lpNumberOfBytesRead);
public static extern ushort GetInputLength(IntPtr hDevice);
public static extern ushort GetOutputLength(IntPtr hDevice);
public static extern uint GetErrorMsg(ref string lpErrorMsg, uint dwErrorMsgSize);
The C# code snippet working with the functions of the class above is in the attachment
this is the interesting part where the data is sent and pulled which I
do not understand to transcode to AutoIT
Important my devices are the type2 (TEMPer1F) :
So in the end I Need: Call DLL, read all devices in array
Loop the Array until ubound(Array) and for each device in Array read the temperature value and prepare the data to
decimal 6,1 (SQL Format) and °C
So how to pull the value from the devices?
Maybe somwbody finds the important part in the C# (the code above is for different models, mine is TEMPer1F
Or maybe someone has solved this and has maybe a uDF for this
For fun, I'm building an app that opens a webpage and refreshes it every 30 seconds.
But once the script performs _IEAction($oIE, "refresh"), the GUI closes.
Any help is appreciated.
;Open the file(s) in the selected folder
$extension = ".txt"
$app2openWith = @SystemDir & "\notepad.exe"
Global $loopTrick = 0
#Region ### START Koda GUI section ### Form=c:\users\mchu\downloads\autoit\my code\form1.kxf
Global $UI = GUICreate("Hit Em Up!", 256, 113, -1, -1)
$menu = _GUICtrlMenu_GetSystemMenu($UI)
_GUICtrlMenu_EnableMenuItem($menu, $SC_CLOSE, 1, False)
Global $url = GUICtrlCreateInput("https://www.youtube.com/watch?v=dQw4w9WgXcQ", 81, 8, 160, 21)
$Label1 = GUICtrlCreateLabel("Target:", 16, 8, 55, 17)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
Global $StartBut = GUICtrlCreateButton("Start", 16, 40, 67, 25)
GUICtrlSetFont(-1, 13, 800, 0, "MS Sans Serif")
$Label2 = GUICtrlCreateLabel("(Press F4 to Exit)", 96, 40, 8000, 17)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
#EndRegion ### END Koda GUI section ###
$UIfunc = GUIGetMsg()
Case $UIfunc = $GUI_EVENT_CLOSE
Case $UIfunc = $StartBut
If GUICtrlRead($url) = "" Then
MsgBox(48, "Um...", "Give me a target you idiot.")
If $loopTrick = 0 Then
Global $oIE = _IECreate(GUICtrlRead($url))
ElseIf $loopTrick = 1 Then
$loopTrick = 1