
ale1981
Active Members-
Posts
47 -
Joined
-
Last visited
ale1981's Achievements

Seeker (1/7)
2
Reputation
-
Nates reacted to a post in a topic: ADO.au3 UDF - BETA - Support Topic
-
mLipok reacted to a post in a topic: ADO.au3 UDF - BETA - Support Topic
-
ADO.au3 UDF - BETA - Support Topic
ale1981 replied to mLipok's topic in AutoIt Projects and Collaboration
Not sure if this has been corrected or not but I downloaded the most recent version (2.1.16 BETA), there is a bug in __ADO_MSSQL_CONNECTION_STRING_WinAuth and caused me a huge headache as I was getting provider not found errors when I knew the provider was installed fine. The curly brackets are not needed around the PROVIDER= $sConnectionString = "PROVIDER={" & _ADO_MSSQL_GetProviderVersion() & "};SERVER=" & $sServer & ";DATABASE=" & $sDataBase & ";" should be $sConnectionString = "PROVIDER=" & _ADO_MSSQL_GetProviderVersion() & ";SERVER=" & $sServer & ";DATABASE=" & $sDataBase & ";" I also added Integrated Security=SSPI; to this line... $sConnectionString &= "Trusted_Connection=True;Integrated Security=SSPI;" -
I think I have found a bug to do with the new temporary projects settings. If I load a project called "Tempt" every time I close the project it thinks I have created a temporary project and asks me if I want to delete, if I say Yes then it deletes my .au3 file!! Is it because the project has the word "TEMP" in it?
- 995 replies
-
- isn autoit studio
- isn
-
(and 3 more)
Tagged with:
-
Thanks, this was correct in my example, but I am even more embarrassed to say why my actual script wasn't working! I had set the range of the DTP in my GUI code to the current date so no date could be selected past today, now when the next day arrived it wasn't updating because the range was still set to yesterday! I have now changed that so whenever I change the DTP it updates the range to the current day! I thought I would reply to help others but hopefully nobody else is stupid enough to make the same mistake as me!
-
I am having a problem with updating a DTP control with the correct date once the script has ran, can somebody try this code for me; Turn your PC date back one day, run the code below, turn your PC date back to today and click the Update button, shouldn't the DTP update to the current date (@MDAY) or am I doing this wrong? The @MDAY is correct when written to the console. #include <GUIConstantsEx.au3> #include <GuiDateTimePicker.au3> #include <WindowsConstants.au3> Global $g_hDTP Example() Func Example() Local $hGUI ; Create GUI $hGUI = GUICreate("(UDF Created) DateTimePick Create", 400, 300) $g_hDTP = _GUICtrlDTP_Create($hGUI, 2, 6, 190) $btnTest = GUICtrlCreateButton( "Update", 200, 6, 100, 20 ) GUISetState(@SW_SHOW) ; Loop until the user exits. ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $btnTest btnTest() EndSwitch WEnd EndFunc Func btnTest() Local $sDate[7] = [ False, @YEAR, @MON, @MDAY, 0, 0, 0 ] _GUICtrlDTP_SetSystemTime( GUICtrlGetHandle($g_hDTP), $sDate ) ConsoleWrite( "MDAY: " & @MDAY & @CRLF ) EndFunc Thanks
-
That's great thanks, look forward to 0.97! Would it be possible to add the option to convert the .isf files to normal .au3 files?
- 995 replies
-
- isn autoit studio
- isn
-
(and 3 more)
Tagged with:
-
ale1981 reacted to a post in a topic: GUI crashes when using GUIDelete inside WM_NOTIFY
-
GUI crashes when using GUIDelete inside WM_NOTIFY
ale1981 replied to ale1981's topic in AutoIt General Help and Support
Works great, thanks once again Melba -
I might be doing this wrong but this seems to crash the GUI, what I want is to click the button, select something from the list view with a double click which populates the input box and delete's the GUI? #include <GUIConstantsEx.au3> #include <GUIListView.au3> #include <Misc.au3> #include <WindowsConstants.au3> $hGUI = GUICreate("Test", 400, 400) $btn = GUICtrlCreateButton( "", 150, 50, 75, 20 ) $cInput = GUICtrlCreateInput( "", 10, 50, 100, 20 ) GUISetState() GUIRegisterMsg( $WM_NOTIFY, "WM_NOTIFY" ) Global $idListview While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $btn listpackers() EndSwitch WEnd Func listPackers() Global $packersGUI = GUICreate( "Packers List", 300, 300, -1, -1, $WS_SYSMENU ) $idListview = GUICtrlCreateListView( "", 2, 2, 294, 268 ) GUISetState( @SW_SHOW ) Local $packerList[2][2] = [[1, "Name1"],[2, "Name2"]] ; Add columns _GUICtrlListView_AddColumn( $idListview, "Packer ID", 75 ) _GUICtrlListView_AddColumn( $idListview, "Packer Name", 150 ) _GUICtrlListView_SetItemCount( $idListview, 3 ) _GUICtrlListView_AddArray( $idListview, $packerList ) _GUICtrlListView_DeleteItem( $idListview, 0 ) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo, $tBuffer, $tBuffer2 $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $iIDFrom Case $idListview Switch $iCode Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) GUICtrlSetData( $cInput, _GUICtrlListView_GetItemText($idListview, DllStructGetData($tInfo, "Index")) ) GUIDelete( $packersGUI ) Return 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc
-
I think I have found a bug with the updown control, even with the ES_NUMBER style I can input anything? If I add this to Extracode; GUICtrlSetStyle( $control_handle, $ES_NUMBER ) It works but the control looks greyed out? This is since I started using the formstudio2 exe I downloaded from your forums due to the other bug with the updown control and $UDS_NOTHOUSANDS
- 995 replies
-
- isn autoit studio
- isn
-
(and 3 more)
Tagged with:
-
ale1981 reacted to a post in a topic: Using the {enter} key as a Tab
-
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
That's the route I have just tried and it works great Big thanks for all your help Melba. -
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
Melba, Is it possible to detect which of the Accelerator keys was pressed or would it be best to split them in to separate keys? -
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
PM sent, just trying your new code now! -
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
Melba, On most controls I would like the Tab key to do as it usually does but only on 3 of my inputs I want it to work with the Enter key. Can I PM you my code rather than post it here, it's 550 lines? Thanks -
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
Melba I did think of doing this, but if I do that, the Tab key will only work on the inputs I set in the Accelerator handler? -
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
Melba, Thanks for the reply. I see exactly what you are saying, now my problem is the Tab key does nothing, so if I amend the code to the below then press the Tab key, pressing Enter on the message box still seems to move the focus or I get two message boxes appear? #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WinAPI.au3> $hGUI = GUICreate("Test", 500, 500) $cInput_1 = GUICtrlCreateInput("", 10, 10, 200, 20) $cInput_2 = GUICtrlCreateInput("", 10, 50, 200, 20) $cInput_3 = GUICtrlCreateInput("", 10, 90, 200, 20) $cEnter = GUICtrlCreateDummy() GUISetState() Local $aAccelKeys[1][2] = [["{ENTER}", $cEnter]] GUISetAccelerators($aAccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cInput_1 If checkEntry() = True Then ; Correct so move to next input GUICtrlSetState($cInput_2, $GUI_FOCUS) EndIf Case $cEnter Switch _WinAPI_GetFocus() Case GUICtrlGetHandle($cInput_1) ; Check the input content If checkEntry() = True Then ; Correct so move to next input GUICtrlSetState($cInput_2, $GUI_FOCUS) EndIf ; Not correct so stay in current input Case GUICtrlGetHandle($cInput_2) If checkEntry() = True Then GUICtrlSetState($cInput_3, $GUI_FOCUS) EndIf Case GUICtrlGetHandle($cInput_3) If checkEntry() = True Then ConsoleWrite("End" & @CRLF) EndIf EndSwitch EndSwitch WEnd Func checkEntry() ; Random chance of correct answer or fail If Mod(@SEC, 2) = 0 Then MsgBox($MB_SYSTEMMODAL, "Test Fail", "Press Enter to close this message box" ) Return False EndIf Return True EndFunc -
Using the {enter} key as a Tab
ale1981 replied to ale1981's topic in AutoIt General Help and Support
Would it be possible to use this property in AutoIt? http://msdn.microsoft.com/en-us/library/system.windows.forms.keyeventargs.handled(v=vs.110).aspx I could then say that the event has been handled elsewhere?