-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By edubensa
Hi! Can someone help me with this? I upgraded from SciTe Edit Lite to full version. Now every time I edit a script it opens on a new SciTe tab, but I want it opens on a new window like before the upgrade. Can someone help me with that? Thanks!!
-
By AntS
Help! The mouse clicks I'm sending to a control on a dialog box produce no response.
The dialog box in question handles advanced display properties. The tab page my script interacts with is created by Trident Microsystems. It allows the user to enhance or attenuate the screen's RGB values. (See image.) My script automates the process of changing these in order to adjust the screen's hue or, when the red, green and blue values are all the same, the brightness.
Producing a script to change the brightness has been quite straightforward. I use ControlClick() to send a mouse click to one of the trackbars on the right of the tab page. By default, they're linked and so move as one. The difficulty I'm having however is in automating the process when the desired red, green and blue values aren't the same as each other.
Ordinarily, there are three ways of doing this:
(1) clear the Link check box to unlink the three trackbars then either click on each trackbar or drag their sliders,
(2) clear the Link tick-box then for each colour, click on the corresponding trackbar slider (to select it) then click on a point on the graph, and
(3) click on the Load button to open an Open dialog box and load a preset (stored as a .gam file).
However, when ControlClick() is used to clear the Link check box or to push the Load button, nothing happens. Making the dialog box the active window makes no difference.
The AutoIt Window Info tool indicates that the Reload a Bitmap, Save, Load and Reset buttons, the Link check box and the graph are all the same control. (See other images.) In fact, it there are only four controls on the page: the tab page, which is an instance of a SysTabControl32 class, and the three trackbars, each of which is an instance of the TridentTrackBar class. (Am unsure whether the SysTabControl32 class is a Windows or third-party control.)
What's the solution?
Note that the MouseClick() function—as opposed to ControlClick()—does work, but having AutoIt commandeer the screen pointer isn't an acceptable solution.
For the sake of completeness, here's the relevant code fragment for the Link check box.
;unlink trackbars WinActivate("(Multiple Monitors)") ControlClick("(Multiple Monitors)", "", 12320, "left", 1, 211, 252)
-
By Jemboy
Recently I was working on a script with icons using GuiCtrkCreatIcon.
I decided to change the sub folder name of the icons to a more meaning name, however made a typo.
I tested the .exe on my test computer and it worked flawlessly (because both icon folder where on my test computer) 😁
But after I installed the script on the intended computers , I got chaos!😵
Zooming into the problem, I discovered, that because the icons could not be found, the ControlID were returned with a value of 0
and thus played havoc within the GuiGetMsg() switch/case statement.
I have been able to reproduce this (see example)
#include <GUIConstantsEx.au3> ;============================================================================================================ ; PLEASE, do not save this example in the example folder: C:\Program Files (x86)\AutoIt3\Examples\Helpfile ;============================================================================================================ Example() Func Example() GUICreate(" My GUI Icons", 250, 250) $Icon1 = GUICtrlCreateIcon("shell32.dll", 10, 20, 20) $Icon2 = GUICtrlCreateIcon(@ScriptDir & '\Extras\horse.ani', -1, 20, 40, 32, 32) $Icon3 = GUICtrlCreateIcon("shell32.dll", 7, 20, 75, 32, 32) GUISetState(@SW_SHOW) ;$Icon2 = -1 ; ==> When this line is uncommented the script "works", so -1 could be a potential fix. ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Icon2 Beep (500,500) EndSwitch WEnd GUIDelete() EndFunc ;==>Example If you save the above script outside the Autoit example folder and run it, it will keep beeping because GuiCtrlCreatIcon did not find horse.ani and return $Icon2=0.
At the moment GUICtrlCreateIcon () only returns the conntrolID on success and 0 on failure.
I would like to propose a return of -1 on failure, so a existing and working script won't go awry when the icon can not be found.
-
By Zobu
Hey Guys,
I want to add a new checkbox with its own variable every time the add button is clicked.
The added checkboxes should remain when I close the window or exit the script and when I reopen I should be able to add new checkboxes aswell.
here is what I have so far..
#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <EditConstants.au3> #include <MsgBoxConstants.au3> #include <GuiButton.au3> $test = GUICreate("adding test", 475, 345, 500, 175) $Check1 = GUICtrlCreateCheckbox("Checkbox 1", 15, 25, 300, 25) $Button = GUICtrlCreateButton("Add", 365, 25, 90, 20) $Check2 = GUICtrlCreateCheckbox("Checkbox 2", 15, 50, 300, 25) $Check3 = GUICtrlCreateCheckbox("Checkbox 3", 15, 75, 300, 25) GUICtrlSetState($Check2, $GUI_HIDE) GUICtrlSetState($Check3, $GUI_HIDE) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ; Exit Case $Button GUICtrlSetPos($Check2, 15, 50, 300, 25) GUICtrlSetState($Check2, $GUI_SHOW) Case $Button GUICtrlSetPos($Check3, 15, 75, 300, 25) GUICtrlSetState($Check3, $GUI_SHOW) EndSwitch WEnd
-
By MarcoMonte
Hello Everyone,
Hoping someone can help me,
I am totally stuck on this problem,
I cannot reach the textarea and the button in a maps page that I get by clicking on a button in a previus page, the only way I can interact with this is using tab and mouseclick but this is a danger method as you know.
I get the handle by using: $Posizione = _IEAttach("Ricerca Indirizzo su mappa")
then I tried a lot of things but nothing works, can someone give me a hint?
--------------------
WinWait("Ricerca Indirizzo su mappa")
sleep(1000)
$Posizione = _IEAttach("Ricerca Indirizzo su mappa")
WinSetState ("Ricerca Indirizzo su mappa", "", @SW_MAXIMIZE )
WinActivate("Ricerca Indirizzo su mappa")
sleep(500)
;~ $oForm = _IEFormGetObjByName($Posizione, "form1");Punta il Form
$oText = _IEFormElementGetObjByName($Posizione,"indirizzo")
$oText = _IEFormElementGetObjByName($Posizione,"writeAddress")
;~ $LenteTestoMess = _IEFormElementGetValue($oText);Inserisce il PrimoRepertorio nella variabile
;~ _IELinkClickByText($Posizione, $oForm);Clicca su Aggiorna ed invia il form
_IEFormElementSetValue ($oText,"via Ravenna 12" );Completamento campo testo
----------------------------------------------------
Mappa.odt Ricerca Indirizzo su mappa.htm
-
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