Leaderboard
Popular Content
Showing content with the highest reputation on 11/27/2017 in all areas
-
Autoit script at Windows 10 startup (before logon)
Earthshine reacted to careca for a topic
What about BIOS? i know most MB's have the option to turn on NUMlock at boot, maybe you have for scroll?1 point -
Excel UDF Help
Julia_Muc reacted to Earthshine for a topic
I am looking at it. so far, for me, it opens, puts in the word test to the first cell in upper left of worksheet, and does not save. so I can test this and get back.1 point -
I have been playing with something very different, but perhaps this will work for you. This uses a very old HTML trick where you take 1x1 pixel image file which you stretch the length you want. You can make your own _color_????.jpg files... The While loop here is not a good implementation, but its about showing the use of the color files... #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.14.2 Author: Skysnake Script Function: Sometimes it is necessary to display color in GUIs - often graphic color overhead is not required - Make 1x1 pixel color files - Read and display those colors #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <File.au3> Example() Func Example() ; read all _color_??? image files to array Local $aColorFileList = _FileListToArray(@ScriptDir, "_color_*") #comments-start -- uncomment this section for debug info ; Display the results returned by _FileListToArray. _ArrayDisplay($aColorFileList, "$aFileList") ConsoleWrite("Show comment with trailing text issue" & @CRLF) #comments-end -- uncomment this section for debug info ; Create a GUI with various controls. Local $hGUI = GUICreate("Example", 400, 100) Local $thePic = GUICtrlCreatePic("", 0, 0, 400, 4) ; LTWH Local $thePicL = GUICtrlCreatePic("", 0, 0, 4, 100) ; LTWH Local $theColorname = GUICtrlCreateLabel("", 8, 8, 400, 20) ; LTWH ; Display the GUI. GUISetState(@SW_SHOW, $hGUI) ; Display the child GUI. GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch For $c = 1 To UBound($aColorFileList) - 1 GUICtrlSetImage($thePic, $aColorFileList[$c]) GUICtrlSetImage($thePicL, $aColorFileList[$c]) GUICtrlSetData($theColorname, StringMid($aColorFileList[$c], 8)) ;~ ConsoleWrite("$aColorFileList[$c][0]" &$aColorFileList[$c]& @CRLF) Sleep(2500) Next WEnd ; Delete the previous GUIs and all controls. GUIDelete($hGUI) EndFunc ;==>Example The zip file includes this code and three _color_???.jpegs. Download: colorme.7z Skysnake1 point
-
1 point
-
How to set the input border color?
oceanwind reacted to argumentum for a topic
I'm not really good at this, what @Melba23 gave you is it. I just added the no border you wanted. Play around with Koda. Koda is included with the editor. From within the editor, you can press Alt-M to bring it up. ( if you are editing an AU3 script )1 point -
In your example, you could also do Case $Radio1 To $Radio4 as long as the radio buttons are created in sequence order and no other controls in between (because each control is assigned an integer index which increments by 1 each time). #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 539, 438, 192, 124) $Radio1 = GUICtrlCreateRadio("Radio1", 112, 80, 113, 17) $Radio2 = GUICtrlCreateRadio("Radio2", 112, 120, 113, 17) $Radio3 = GUICtrlCreateRadio("Radio3", 112, 160, 113, 17) $Radio4 = GUICtrlCreateRadio("Radio4", 112, 200, 113, 17) $Button1 = GUICtrlCreateButton("Button1", 112, 272, 75, 25) GUICtrlSetState($Button1, $GUI_DISABLE) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Radio1 To $Radio4 If BitAND(GUICtrlRead($nMsg), $GUI_CHECKED) Then GUICtrlSetState($Button1,$GUI_ENABLE) Else GUICtrlSetState($Button1,$GUI_DISABLE) EndIf Case $Button1 MsgBox(0,"Clicked!","Clicked OK",3) GUICtrlSetState($Radio1,$gui_UNCHECKED) GUICtrlSetState($Radio2,$gui_UNCHECKED) GUICtrlSetState($Radio3,$gui_UNCHECKED) GUICtrlSetState($Radio4,$gui_UNCHECKED) GUICtrlSetState($Button1,$GUI_DISABLE) EndSwitch WEnd However, Danyfirex is right, you'll likely want to evaluate each radio button on it's own. Also, there's not much point evaluating if a radio button is checked if clicking it is what triggered the event, unless I'm not considering / overlooking something?1 point
-
The correct way is. Case $Radio1, $Radio2, $Radio3, $Radio4 Saludos1 point
-
How to set the input border color?
Skysnake reacted to argumentum for a topic
#include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cLabel = GUICtrlCreateLabel("", 9, 9, 202, 22) GUICtrlSetState($cLabel, $GUI_DISABLE) GUICtrlSetBkColor($cLabel, 0xFF0000) $cInput = GUICtrlCreateInput("", 10, 10, 200, 20, -1, 0) ; <------ GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() Exit EndSwitch WEnd1 point -
How to set the input border color?
edumanilha reacted to Melba23 for a topic
oceanwind, I usually use an overlaid label like this: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cLabel = GUICtrlCreateLabel("", 9, 9, 202, 22) GUICtrlSetState($cLabel, $GUI_DISABLE) GUICtrlSetBkColor($cLabel, 0xFF0000) $cInput = GUICtrlCreateInput("", 10, 10, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M231 point -
IE Embedded doesn't display some sites well
coffeeturtle reacted to Gianni for a topic
Hi @coffeeturtle, maybe the display area you dedicated to the Browser Control is too little and this will scramble the web page layout? or maybe that page requires a newer version of the Browser control. The embedded IE, that is not an IE instance, but it's a "Browser Control" instead, by default acts like an IE7. You have to change some registry key to make it act as a newer version of IE. Have a look here for a quick reference, (hope it can help...)1 point -
@Skysnake What about the problem with DSN connection ? Did you check: [HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources] "SQL TEST"="SQL Server Native Client 11.0" [HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI\SQL TEST]1 point
-
Eg for IE11 installed (no UDF version): #include <IE.au3> #include <Process.au3> Local $regValue = "0x2AF8" ; IE11 edge mode: 11001 (0x2AF9) ; IE11: 11000 (0x2AF8) ; IE10: 10001 (0x2711) ; IE10: 10000 (0x02710) ; IE 9: 9999 (0x270F) ; IE 9: 9000 (0x2328) ; IE 8: 8888 (0x22B8) ; IE 8: 8000 (0x1F40) ; IE 7: 7000 (0x1B58) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION", _ProcessGetName(@AutoItPID), "REG_DWORD", $regValue) ;~ RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", @ScriptName, "REG_DWORD", $regValue) ;~ RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION",@ScriptName, "REG_DWORD", $regValue) Global $mainwin = GUICreate("IE test", 968, 688) Global $OBJECT = ObjCreate("Shell.Explorer.2") Global $OBJECT_CTRL = GUICtrlCreateObj($OBJECT, 0, 0, 968, 688) GUISetState() _IENavigate($OBJECT, "http://www.whatsmyuseragent.com/") ;~ _IENavigate($object, "http://www.pinterest.com/") While 1 Sleep(10) If GUIGetMsg() = -3 Then ExitLoop WEnd1 point
-
Even after nearly 2 years, I still like this approach to writing AutoIt code1 point
-
Change Tab Color
Clerythecleric reacted to Yashied for a topic
Good idea. Alternatively, you can draw the Labels over the Tab edges with the desired color.1 point