Jump to content

MistakenSanity

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

MistakenSanity's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Can someone help me with returning a postgreSQL query? I have gotten the code to connect to the database working, but I am unable to actually run a query, i just get an error return every time. I have successfully done so with MySQL. From looking at other examples the setup to do so is a bit different for postgreSQL, but when using those examples i get a failure. ;==================== AUTOIT WRAPPER START ==================== #AutoIt3Wrapper_UseX64=n ;==================== AUTOIT WRAPPER STOP ==================== ;==================== INCLUDES START ==================== #include <Array.au3> ;==================== INCLUDES STOP ==================== ;==================== VARIABLES START ==================== $TEMP_QueryReturn = ObjCreate("ADODB.Recordset") Global $SETTING_Driver = "PostgreSQL Unicode" Global $SETTING_Server = "192.168.1.12" Global $SETTING_Port = "5432" Global $SETTING_DatabaseName = "test" GLobal $SETTING_Username = "test" Global $SETTING_Password = "test" Global $SETTING_Query = 'SELECT * FROM settings' $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Install a custom error handler ;==================== VARIABLES STOP ==================== ;==================== CONNECT TO DATABASE START ==================== Global $Connection = ObjCreate("ADODB.Connection") ;~ $Connection.open ("DRIVER=" & $SETTING_Driver & ";SERVER=" & $SETTING_Server & ";DATABASE=" & $SETTING_DatabaseName & ";UID=" & $SETTING_Username & ";PWD=" & $SETTING_Password & ";PORT=" & $SETTING_Port) $Connection.open ("DSN=PostgreSQL;DATABASE=test;SERVER=192.168.1.12;Port=5432;Uid=test;Pwd=test") If @error Then MsgBox(0,"","Error Opening Connection") ;==================== CONNECT TO DATABASE STOP ==================== ;==================== RUN QUERY START ==================== $TEMP_QueryReturn.open($SETTING_Query,$Connection,1,3) If @error Then MsgBox(0,"","Error Executing Query") ;==================== RUN QUERY STOP ====================
  2. I am trying to create a custom touch screen interface. See Picture: https://imgur.com/HrI4KIK I want to set the workspace only to the white area. meaning when a window is maximized I want to make it so it cannot cover the gray areas. I want the gray sections showing at all times. Any push in the right direction would be great. Even for the proper search terms to help me find what I'm looking for.. EDIT: Might have found it from Melba ( ) Will report back if I still need assistance.. Melba you are a god! IGNORE TOPIC!
  3. Thank you so much for your help!!! Sorry for the PM :-). This is almost how I was trying to do it, but i was a bit off it appears. Thanks!!!!
  4. I have been trying to figure this out for some time now and haven't found much help in the forums. I have a script that uses checkboxes do complete a list of tasks. The list has grown so big that it becomes a pain to check or uncheck tons of boxes depending on what you are doing. I want to add a drop down with "profiles" you can select and depending on what profile you select a different selection of boxes will be checked. I tried using an if statement but the gui wasnt refreshing to effect the change to the drop down. Below is a modified version of the script so you can see what I am trying to do. If anyone could help or point me in the right direction I would greatly appreciate it!!!! #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=D:\Frank's Documents\Auto-It Scripts Archive\Scripts in Devlopment\Form1.kxf $Form1 = GUICreate("Window Title", 327, 530, 193, 125) ;_GUIScrollBars_Generate($Form1,0,700) $option1 = "Config 1" $option2 = "Config 2" $option3 = "Config 3" $DropDown = GuiCtrlCreateCombo($Option1, 25, 10, 280, 20) GUICtrlSetData(-1, $option2) GUICtrlSetData(-1, $option3) $Chk_Number1 = GUICtrlCreateCheckbox("Number 1", 25,30, 250, 15) $Chk_Number2 = GUICtrlCreateCheckbox("Number 2", 25,50, 250, 15) $Chk_Number3 = GUICtrlCreateCheckbox("Number 3", 25,70, 250, 15) $btnok = GUICtrlCreateButton("OK", 25, 100, 75, 25) GUISetState(@SW_SHOW) $Checked_State = False GUICtrlSetState($Chk_Number1,$GUI_CHECKED) #EndRegion ### END Koda GUI section ### ;TrayTip("Checkbox State",$STATE,1) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ;Allows Close Button At Top Right Corner To Exit The Script Exit Case $btnok GuiSetState(@SW_HIDE) ;Number1 If BitAnd(GUICtrlRead($Chk_Number1),$GUI_CHECKED) = $GUI_CHECKED THEN; ElseIf BitAnd(GUICtrlRead($Chk_Number1),$GUI_UNCHECKED) = $GUI_UNCHECKED THEN; EndIf ;Number2 If BitAnd(GUICtrlRead($Chk_Number2),$GUI_CHECKED) = $GUI_CHECKED THEN; ElseIf BitAnd(GUICtrlRead($Chk_Number2),$GUI_UNCHECKED) = $GUI_UNCHECKED THEN; EndIf ;Number3 If BitAnd(GUICtrlRead($Chk_Number3),$GUI_CHECKED) = $GUI_CHECKED THEN; ElseIf BitAnd(GUICtrlRead($Chk_Number3),$GUI_UNCHECKED) = $GUI_UNCHECKED THEN; EndIf Exit EndSwitch $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
  5. Everything is working perfectly now thanks! Turns out the problem was the network I was on. My work network must have kept corrupting the download because I came home and downloaded it and it worked perfectly.
  6. It appears I am really doing something wrong. I downloaded the zip file and put "GUIScrollbars_EX.au3" and "GUIScrollbars_Size.au3" into the "Include" folder in AutoIt's program folder. After I do that I tried to run your "GUIScrollbars_Ex_Example_1.au3 and get an error stating "Scrollbar generation failed"
  7. I did some searching on the forums and didn't see an answer to this. I have also messed with examples from AutoIt, but i couldnt get it working. The script below has many checkboxes and I want to add a lot more. The problem is that I run out of room in the GUI. I know I can expand the GUI window, but I want to keep it the same size and just add a scroll bar to scroll through the check boxes. Can anyone assist me or point me in a good direction? #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> HotKeySet("{ESC}", "EndScript") #Region ### START Koda GUI section ### Form=D:\Frank's Documents\Auto-It Scripts Archive\Scripts in Devlopment\Form1.kxf $Form1 = GUICreate("GUI WITH SCROLLBARS", 327, 370, 193, 125) $Chk_1 = GUICtrlCreateCheckbox("1", 25, 10, 200, 15) $Chk_2 = GUICtrlCreateCheckbox("2", 25, 30, 200, 15) $Chk_3 = GUICtrlCreateCheckbox("3", 25, 50, 200, 15) $Chk_4 = GUICtrlCreateCheckbox("4", 25, 70, 200, 15) $Chk_5 = GUICtrlCreateCheckbox("5", 25, 90, 200, 15) $Chk_6 = GUICtrlCreateCheckbox("6", 25, 110, 200, 15) $Chk_7 = GUICtrlCreateCheckbox("7", 25, 130, 200, 15) $Chk_8 = GUICtrlCreateCheckbox("8", 25, 150, 200, 15) $Chk_9 = GUICtrlCreateCheckbox("9", 25, 170, 200, 15) $Chk_10 = GUICtrlCreateCheckbox("10", 25, 190, 200, 15) $Chk_11 = GUICtrlCreateCheckbox("11", 25, 210, 200, 15) $Chk_12 = GUICtrlCreateCheckbox("12", 25, 230, 200, 15) $Chk_13 = GUICtrlCreateCheckbox("13", 25, 250, 200, 15) $btnok = GUICtrlCreateButton("OK", 1, 340, 75, 25) GUISetState(@SW_SHOW) $Checked_State = False #EndRegion ### END Koda GUI section ### While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE EndSwitch $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func EndScript() Exit EndFunc
×
×
  • Create New...