-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By marcoauto
ciao
I have a Delphi compiled program that I use for work and I can read some logs with this function:
Func __ReadExternalListBox() Local $hListBox, $iItemCount $hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") ConsoleWrite("$hListBox = " & $hListBox & @CRLF) $iItemCount = _GUICtrlListBox_GetCount($hListBox) For $i = $iStart To $iItemCount - 1 ConsoleWrite(GUICtrlListBox_GetText($hListBox,$i) & @CRLF) Next EndFunc ;==>__ReadExternalListBox I can find pid and full path of the process.
The problem is when I must open another process: I can't read the new ListBox because the title of the window to read is the same and the function
$hListBox = ControlGetHandle("Software Setup", "", "[CLASS:TListBox; INSTANCE:1]") return me only one handle.
With Autoinfo I can read handle: is, for this instance, 0x0001099C and is $hListBox
But I need to automize some function and I can't always change in runtime this values.
Ideas? Is there e method to read this title windows associated to a determined pid?
PS:
I don't need the handle from the pid windows application, but from its control
if I use
_WinAPI_EnumProcessWindows() the function return me window handle, not Control handle
I
In this case Windows Handle is 0x001007DA but I need Control Handle that is 0x0001099C
Thankyou
Marco
-
By ashraful089
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Engr. Ashraful\Videos\koda_1.7.3.0\Forms\ProgramPlayer\FormProgamToOpen.kxf
$FormInput = GUICreate("Input", 302, 205, 454, 285)
$Resolution = GUICtrlCreateCombo("Resolution", 80, 24, 145, 25)
GUICtrlSetData(-1, "1920|VM1920|1366")
$ComboProgramType = GUICtrlCreateCombo("Program Type Selection", 80, 64, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Multimedia|Official|Design|Web")
$ButtonEnter = GUICtrlCreateButton("Enter", 104, 104, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
please help me to read combo box input and use the value for another function/ work
-
By Aapjuh
Hi,
I am having a problem properly saving the Width of a resizable Gui.
When a user resizes the Gui it gets saved in an ini when the Gui closes to then restore the new Width upon reopening the app.
with GUICreate("myGui",300,200,Default,Default,$WS_SIZEBOX)
WinGetPos($hGUI) returns 314, and WinGetClientSize($hGUI) returns 298
when its then saved in the ini the gui keeps expanding or shrinking every time its opened by +14 or -2
I figure it has to do with borders etc, but i also guess borders depend on the window theme and whatnot or is user specific, so i can't just do $GuiWidth = $GetGuiWidth[arr] -14 or +2 right?
is there a proper way of doing this?
Thanks in advance,
Aapjuh
-
By It_is_me_Me
I have provided a portion of my script (seen below) and I wanted to use what the USER will input into my IP address box and input box for TCP port. I set the IP address to use 0.0.0.0 as default and the Port to 502. But I want to let the user change it and when they click the buttons (IP Address and Port), the tooltip will show what the USER entered. How can I use the details that the User will input into my input box and IP address box and let them see what they entered when they click the buttons?
Here are the scripts:
;-------------------------------------------------------------
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiIPAddress.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiEdit.au3>
#include <MsgBoxConstants.au3>
#include <Date.au3>
#include <TabConstants.au3>
#include <GuiTab.au3>
Global $Form1 = GUICreate("Security Automation", 490, 339, -1, -1)
;MAIN Tab
Global $TAB = GUICtrlCreateTab(0, 0, 489, 337)
Global $tab_main = GUICtrlCreateTabItem("Main")
$label_Title = GUICtrlCreateLabel("ETP-073 Security", 12, 33, 103, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
;-----------------TCP User input information-------------------------------------------------------------------------------
$groupBox_TCP = GUICtrlCreateGroup("TCP", 12, 49, 289, 57, BitOR($GUI_SS_DEFAULT_GROUP,$BS_FLAT))
;TCP IP address
Global $IPAddress1 = _GUICtrlIpAddress_Create($Form1, 20, 81, 170, 21)
$Label_ipAddress = GUICtrlCreateLabel("Host IP Address", 20, 65, 80, 17)
$userInputIP = _GUICtrlIpAddress_Set($IPAddress1, "0.0.0.0")
;TCP Port
$label_tcpPort = GUICtrlCreateLabel("Port", 196, 65, 23, 17)
Global $input_tcpPort = GUICtrlCreateInput("502", 196, 81, 57, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
$userPort = GUICtrlRead($input_tcpPort)
;TCP Address
$label_tcpAddress = GUICtrlCreateLabel("Addr.", 260, 65, 29, 17)
Global $input_tcpDevAddress = GUICtrlCreateInput("1", 260, 81, 33, 21, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
;Buttons
Global $btn_userIP = GUICtrlCreateButton("User IP", 308, 297, 81, 25)
Global $btn_Port = GUICtrlCreateButton("Port", 404, 297, 75, 25)
;Showing the GUI
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $btn_userIP
ToolTip($userInputIP)
Case $btn_Port
ToolTip($userPort)
EndSwitch
WEnd
;--------------end of script ------------------
Note: There will be a "!->Includefile <WMDebug.au3> not found." Pay no attention to it.
-
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