Jump to content

JayT

Members
  • Posts

    1
  • Joined

  • Last visited

Recent Profile Visitors

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

JayT's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I am working on a project for my camping friends that will help with reserving a camping site. The program was working fine up until about 3 months ago and for some reason not it will not pass the full URL to the site? Perhaps they made a change on their side that is causing this? I get the error "The 'AR' module is not a valid search module. (VSI: Web-Global-25)" I will paste the code that was working below. Any help would be appreciated. Thank you in advance. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=icons8-trailer-30.ico #AutoIt3Wrapper_Res_Description=Reserve A-Spot By Jayware #AutoIt3Wrapper_Res_Fileversion=3.0.0.0 #AutoIt3Wrapper_Res_CompanyName=Jayware #AutoIt3Wrapper_Res_LegalCopyright=Jayware #AutoIt3Wrapper_Res_File_Add=icons8-trailer-30.ico #AutoIt3Wrapper_Res_File_Add=Camper.jpg #Au3Stripper_Parameters=/sv #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <IE.au3> #include <InetConstants.au3> #include <Constants.au3> #include <Array.au3> #include <GuiComboBox.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <InetConstants.au3> #include <MsgBoxConstants.au3> #Include <GuiComboBoxEx.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Date.au3> Local $sNewDate = _DateAdd('d', 180, _NowCalcDate ()) #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\tedescoj\documents\autoit scripts\park_reservation_gui-v2.kxf $Form1_1 = GUICreate("Reserve A-Spot! V3.2", 698, 477, -1, -1) GUISetIcon("C:\Users\Tedescoj\Documents\Autoit Scripts\icons8-trailer-30.ico", -1) GUISetBkColor(0x008080) $Pic1 = GUICtrlCreatePic("Camper.jpg", 16, 17, 230, 157) $Group1 = GUICtrlCreateGroup("", 291, 78, 382, 153) $Heading = GUICtrlCreateLabel("Select a Park:", 341, 102, 101, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Combo1 = GUICtrlCreateCombo("Smith Point", 475, 102, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Cupsogue|Indian+Island|Montauk|Sears+bellows|Shinnecock+East|Southaven|West+Hills") GUICtrlSetBkColor(-1, 0xBFCDDB) $hookups = GUICtrlCreateCombo("Sewer", 475, 134, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Basic|Electric|Outer+Beach") GUICtrlSetBkColor(-1, 0xBFCDDB) $Label3 = GUICtrlCreateLabel("Select Hookup:", 341, 134, 106, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Number_of_Nights = GUICtrlCreateCombo("4", 475, 167, 145, 25) GUICtrlSetData(-1, "5|6|7|8|9|10|11|12|13|14") GUICtrlSetBkColor(-1, 0xD7E4F2) $Label2 = GUICtrlCreateLabel("Number of Nights:", 340, 166, 115, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") GUICtrlCreateGroup("", -99, -99, 1, 1) $Search = GUICtrlCreateButton("Search", 416, 370, 174, 44) GUICtrlSetFont(-1, 15, 800, 2, "@MingLiU-ExtB") GUICtrlSetBkColor(-1, 0xBFCDDB) $Label1 = GUICtrlCreateLabel("Check Availability", 417, 257, 161, 28) GUICtrlSetFont(-1, 16, 800, 2, "Calibri") $Date = GUICtrlCreateLabel("Enter Date:", 320, 313, 85, 20, $SS_SUNKEN) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") $Month = GUICtrlCreateCombo("Month", 416, 312, 57, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12|") GUICtrlSetBkColor(-1, 0xBFCDDB) $Day = GUICtrlCreateCombo("Day", 480, 312, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30") GUICtrlSetBkColor(-1, 0xBFCDDB) $Year = GUICtrlCreateCombo("2021", 552, 312, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "2021|2022|2023") GUICtrlSetBkColor(-1, 0xBFCDDB) $MonthCal1 = GUICtrlCreateMonthCal("2021/04/06", 16, 184, 235, 196) $Label4 = GUICtrlCreateLabel("Reserve A-Spot !", 373, 27, 198, 36) GUICtrlSetFont(-1, 18, 800, 2, "Segoe UI Emoji") GUICtrlSetColor(-1, 0x000000) $Label5 = GUICtrlCreateLabel("Jayware. 2021", 17, 450, 64, 16) GUICtrlSetFont(-1, 8, 400, 0, "Script") $Label6 = GUICtrlCreateLabel("*** Tool Tip ***", 84, 390, 87, 19) GUICtrlSetFont(-1, 9, 800, 4, "Arial") $Label7 = GUICtrlCreateLabel($sNewDate, 284, 413, 70, 19) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label8 = GUICtrlCreateLabel("It is best to book 180 days prior wich would be:", 8, 413, 272, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Search sleep (1000) $Date1 = GUICtrlRead ($Month) $Date2 = GUICtrlRead ($Day) $Date3 = GUICtrlRead ($Year) $location = GUICtrlRead ($Combo1) $hookup = GUICtrlRead ($hookups) $nights = GUICtrlRead ($Number_of_Nights) If $Date1 = "Month" Then Call ("Valid") Else If $Date2 = "Day" Then Call ("Valid") Else Call ("Search") EndIf EndIf EndSwitch WEnd Valid Func Valid() MsgBox("","Incorrect Date","You Must Select A Correct Date") EndFunc Search Func Search() ; Display a progress bar window. ProgressOn("Searching", "Searching For Available Sites....", "0%", -1, -1, BitOR($DLG_NOTONTOP, $DLG_MOVEABLE)) ; Update the progress value of the progress bar window every second. For $i = 20 To 100 Step 20 Sleep(1000) ProgressSet($i, $i & "%") Next ; Set the "subtext" and "maintext" of the progress bar window. ProgressSet(100, "Done", "Complete") ;Sleep(5000) ; Close the progress window. Local $sCompare = 'data-icon-primary="ui-icon-plusthick"' ; Get page 1` Local $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Local $sData = BinaryToString($dData) ;ConsoleWrite ($sData & @CRLF) Local $aPage = StringRegExp($sData, '<option value="(\d+)', 3) ;_ArrayDisplay($aPage) Local $nPage = $aPage[UBound($aPage)-1] StringReplace($sData, $sCompare, $sCompare) Local $iTotal = @extended ; loop thru all pages using $i as page indicator For $i = 2 to $nPage $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=" & $i & "&gotopagenow=yes&gotopage=&module=RN&multiselectlist_value=", $INET_FORCERELOAD) ProgressOff() $sData = BinaryToString($dData) StringReplace($sData, $sCompare, $sCompare) $iTotal += @extended Next Switch msgbox ($MB_CANCELTRYCONTINUE, $itotal & " Sites Available", "There Are " & $iTotal & " Sites Available At " & $location & " With " & $hookup & " Hookups For The Selected Dates. " & @CRLF & @CRLF & " Click " & "Continue" & " To Go To The Reservation Page, Or " & "Try Again " & "To Search For Another Date.") Case $IDContinue ShellExecute("chrome.exe","https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Case $IDCancel EndSwitch EndFunc
  2. I am not sure how else I to explain it. The code pasted here is the code I copied from my script and when I run it, it runs and works other then the issues I have mentioned. The $INET_FORCELOAD was just added but either way with or without it still produces the same results. is there a way to do a remote session I can show ?
  3. Local $sNewDate = _DateAdd('d', 179, _NowCalcDate ()) #Region ### START Koda GUI section ### Form=C:\Users\Tedescoj\Downloads\koda_1.7.3.0\test\camping_form_1.kxf $Form1_1 = GUICreate("Reserve A-Spot! V3.0", 697, 476, -1, -1) $Pic1 = GUICtrlCreatePic("C:\Users\Tedescoj\Documents\Autoit Scripts\images\Camper.jpg", 16, 16, 230, 157) $Group1 = GUICtrlCreateGroup("", 288, 80, 382, 153) $Heading = GUICtrlCreateLabel("Select a Park:", 336, 104, 101, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Combo1 = GUICtrlCreateCombo("Smith Point", 472, 104, 145, 25) GUICtrlSetData(-1, "Cupsogue|Indian+Island|Montauk|Sears+bellows|Shinnecock+East|Southhaven|West+Hills") $hookups = GUICtrlCreateCombo("Sewer", 472, 136, 145, 25) GUICtrlSetData(-1, "Basic|Electric|Outer+Beach") $Label3 = GUICtrlCreateLabel("Select Hookup:", 336, 136, 106, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Number_of_Nights = GUICtrlCreateCombo("4", 472, 168, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "5|6|7|8|9|10|11|12|13|14") $Label2 = GUICtrlCreateLabel("Number of Nights:", 336, 168, 115, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Site_number = GUICtrlCreateInput("", 472, 200, 145, 21) $Label7 = GUICtrlCreateLabel("Site Number", 336, 200, 115, 19, $SS_SUNKEN) GUICtrlSetFont(-1, 9, 400, 0, "Arial") GUICtrlCreateGroup("", -99, -99, 1, 1) $Search = GUICtrlCreateButton("Search", 416, 368, 174, 44) GUICtrlSetFont(-1, 15, 800, 2, "@MingLiU-ExtB") $Label1 = GUICtrlCreateLabel("Check Availability", 416, 256, 161, 28) GUICtrlSetFont(-1, 16, 800, 2, "Calibri") $Date = GUICtrlCreateLabel("Enter Date:", 336, 312, 70, 20, $SS_SUNKEN) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Month = GUICtrlCreateCombo("Month", 416, 312, 57, 25) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12|") $Day = GUICtrlCreateCombo("Day", 480, 312, 65, 25) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30") $Year = GUICtrlCreateCombo("2021", 552, 312, 65, 25) GUICtrlSetData(-1, "2021|2022") $MonthCal1 = GUICtrlCreateMonthCal("2021/12/18", 16, 184, 235, 196) $Label4 = GUICtrlCreateLabel("Reserve A-Spot !", 376, 24, 198, 36) GUICtrlSetFont(-1, 18, 800, 2, "Segoe UI Emoji") GUICtrlSetColor(-1, 0x0C5440) $Label5 = GUICtrlCreateLabel("Jayware. 2021", 16, 448, 50, 16) GUICtrlSetFont(-1, 8, 400, 0, "Script") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Search sleep (1000) $Date1 = GUICtrlRead ($Month) $Date2 = GUICtrlRead ($Day) $Date3 = GUICtrlRead ($Year) $location = GUICtrlRead ($Combo1) $hookup = GUICtrlRead ($hookups) $nights = GUICtrlRead ($Number_of_Nights) $Site_number = GUICtrlRead ($Site_number) Call ("Search") EndSwitch WEnd Search Func Search() If $Date1 = "Month" Then EndIf If $Date2 = "Day" Then EndIf If $Date3 = "Year" Then MsgBox("","Error","You Must select correct date") EndIf ; Display a progress bar window. ProgressOn("Searching", "Searching For Available Sites....", "0%", -1, -1, BitOR($DLG_NOTONTOP, $DLG_MOVEABLE)) ; Update the progress value of the progress bar window every second. For $i = 20 To 100 Step 20 Sleep(1000) ProgressSet($i, $i & "%") Next ; Set the "subtext" and "maintext" of the progress bar window. ProgressSet(100, "Done", "Complete") ;Sleep(5000) ; Close the progress window. Local $sCompare = 'data-icon-primary="ui-icon-plusthick"' ; Get page 1` Local $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $Site_number & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Local $sData = BinaryToString($dData) ;ConsoleWrite ($sData & @CRLF) Local $aPage = StringRegExp($sData, '<option value="(\d+)', 3) ;_ArrayDisplay($aPage) Local $nPage = $aPage[UBound($aPage)-1] StringReplace($sData, $sCompare, $sCompare) Local $iTotal = @extended ; loop thru all pages using $i as page indicator For $i = 2 to $nPage $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $Site_number & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=" & $i & "&gotopagenow=yes&gotopage=&module=RN&multiselectlist_value=", $INET_FORCERELOAD) ProgressOff() $sData = BinaryToString($dData) StringReplace($sData, $sCompare, $sCompare) $iTotal += @extended Next Switch msgbox ($MB_CANCELTRYCONTINUE, $itotal & " Sites Available", "There Are " & $iTotal & " Sites Available At " & $location & " With " & $hookup & " Hookups For The Selected Dates. " & @CRLF & @CRLF & " Click " & "Continue" & " To Go To The Reservation Page, Or " & "Try Again " & "To Search For Another Date.") Case $IDContinue _IECreate("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $Site_number & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Case $IDCancel EndSwitch EndFunc
  4. here is the code I am trying to execute. The full URL will work in IE however the page will not load anymore for some reason not sure why so I decided to use Chrome and when I do the full URL will not paste? ShellExecute("chrome.exe","https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD)
  5. here is the code I am trying to execute. The full URL will work in IE however the page will not load anymore for some reason not sure why so I decided to use Chrome and when I do the full URL will not paste? ShellExecute("chrome.exe","https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD)
  6. This is what the correct URL looks like when working https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&primarycode=&begindate=06%2F16%2F2022&nights=4&category=Smith+Point&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&keywordoption=Match+One&features1=&features2=&features3=&features4=&features5=&features6=&features7=&features8=&features=&display=Detail&module=RN&multiselectlist_value=&rnwebsearch_buttonsearch=yes" this is what the program is putting out "https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=06%2F16%2F2022&nights=4&category=Smith IDK why it is cutting off the end of the url?
  7. Thank you for the response!! The results are the same. it will bring me to the website but it does not return the results. However, if I copy the url that it pasted in IE and paste it into chrome it works fine.
  8. Any help at all? I still can't figure this out. Much appreciated!
  9. Does anyone know how I can open chrome with variables in the url? for example i need to open a website with the following however the URL stops at $location and does not fill in the rest. _IECREATE used to work but not anymore and not sure why that is?? any help would be appreciated. Thanks! ShellExecute("chrome.exe","https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=",
  10. here is the full url request. but for some reason this does not work in IE anymore. _IECreate("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD)
  11. This is all it enters in the url? doesn't complete all the variables? https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.htmlAction=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=03%2F06%2F2022&nights=4&category=Smith
  12. here is what I have. Doesn't seem to like it? ShellExecute("chrome.exe","https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD)
  13. #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Camping Reservation Checker V3.0", 695, 629, -1, -1) $Pic1 = GUICtrlCreatePic("images\Camper.jpg", 16, 16, 231, 153) $Group1 = GUICtrlCreateGroup("", 256, 16, 345, 153) $Heading = GUICtrlCreateLabel("Select a Park", 328, 40, 79, 19) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Combo1 = GUICtrlCreateCombo("Smith Point", 440, 40, 145, 25) GUICtrlSetData(-1, "Cupsogue|Indian+Island|Montauk|Sears+bellows|Shinnecock+East|Southaven|West+Hills") $hookups = GUICtrlCreateCombo("Sewer", 440, 72, 145, 25) GUICtrlSetData(-1, "Basic|Electric|Outer+Beach") $Label3 = GUICtrlCreateLabel("Select Hookup", 328, 72, 84, 19) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Number_of_Nights = GUICtrlCreateCombo("4", 440, 104, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "5|6|7|8|9|10|11|12|13|14") $Label2 = GUICtrlCreateLabel("Number of Nights", 328, 104, 101, 19) GUICtrlSetFont(-1, 9, 400, 0, "Arial") GUICtrlCreateGroup("", -99, -99, 1, 1) $Submit = GUICtrlCreateButton("Click to Seaarch", 354, 558, 149, 46) GUICtrlSetFont(-1, 8, 400, 0, "MV Boli") $Label1 = GUICtrlCreateLabel("Check All Availability", 352, 187, 186, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Date = GUICtrlCreateLabel("Enter Date:", 265, 235, 70, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Month = GUICtrlCreateCombo("Month", 337, 235, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Month,"01|02|03|04|05|06|07|08|09|10|11|12|") $Day = GUICtrlCreateCombo("Day", 409, 235, 57, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Day, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30") $Year = GUICtrlCreateCombo("2021", 489, 235, 65, 25) GUICtrlSetData(-1, "2021|2022") $Checkbox1 = GUICtrlCreateCheckbox("Site 230", 301, 390, 62, 17) $Checkbox2 = GUICtrlCreateCheckbox("Site 232", 301, 414, 62, 17) $Checkbox3 = GUICtrlCreateCheckbox("Site 234", 389, 414, 62, 17) $Checkbox4 = GUICtrlCreateCheckbox("Site 236", 301, 438, 61, 17) $Checkbox5 = GUICtrlCreateCheckbox("Site 238", 389, 438, 64, 17) $Checkbox6 = GUICtrlCreateCheckbox("Site 240", 301, 462, 60, 17) $Checkbox7 = GUICtrlCreateCheckbox("Site 242", 389, 462, 63, 17) $Checkbox8 = GUICtrlCreateCheckbox("Site 244", 301, 486, 59, 17) $Checkbox9 = GUICtrlCreateCheckbox("Site 246", 389, 486, 63, 17) $Checkbox10 = GUICtrlCreateCheckbox("Site 248", 301, 510, 62, 17) $Checkbox11 = GUICtrlCreateCheckbox("Site 250", 389, 510, 63, 17) $Checkbox12 = GUICtrlCreateCheckbox("Site 245", 493, 366, 64, 17) $Checkbox13 = GUICtrlCreateCheckbox("Site 247", 493, 390, 60, 17) $Checkbox14 = GUICtrlCreateCheckbox("Site 249", 493, 414, 63, 17) $Checkbox15 = GUICtrlCreateCheckbox("Site 251", 493, 438, 61, 17) $Checkbox16 = GUICtrlCreateCheckbox("Site 253", 493, 462, 64, 17) $Checkbox17 = GUICtrlCreateCheckbox("Site 255", 493, 486, 60, 17) $Checkbox18 = GUICtrlCreateCheckbox("Site 257", 493, 510, 63, 17) $Label4 = GUICtrlCreateLabel("Ocean Side", 303, 339, 71, 20) GUICtrlSetFont(-1, 10, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label5 = GUICtrlCreateLabel("Inner Side", 494, 338, 64, 20) GUICtrlSetFont(-1, 10, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label6 = GUICtrlCreateLabel(" Select Below For Smith Point Beach Top Sites !", 288, 280, 317, 21) GUICtrlSetFont(-1, 10, 400, 0, "MV Boli") $Label7 = GUICtrlCreateLabel("These Sites Are For SmithPoint Camping Only", 321, 313, 232, 17) GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif") $MonthCal1 = GUICtrlCreateMonthCal("2021/03/03", 16, 184, 229, 196) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Combo1 If GUICtrlRead($combo1) = ("Smith Point") Then GUICtrlSetState ($Checkbox1, $GUI_ENABLE) GUICtrlSetState($Checkbox2, $GUI_ENABLE) GUICtrlSetState($Checkbox3, $GUI_ENABLE) GUICtrlSetState($Checkbox4, $GUI_ENABLE) GUICtrlSetState($Checkbox5, $GUI_ENABLE) GUICtrlSetState($Checkbox6, $GUI_ENABLE) GUICtrlSetState($Checkbox7, $GUI_ENABLE) GUICtrlSetState($Checkbox8, $GUI_ENABLE) GUICtrlSetState($Checkbox9, $GUI_ENABLE) GUICtrlSetState($Checkbox10, $GUI_ENABLE) GUICtrlSetState($Checkbox11, $GUI_ENABLE) GUICtrlSetState($Checkbox12, $GUI_ENABLE) GUICtrlSetState($Checkbox13, $GUI_ENABLE) GUICtrlSetState($Checkbox14, $GUI_ENABLE) GUICtrlSetState($Checkbox15, $GUI_ENABLE) GUICtrlSetState($Checkbox16, $GUI_ENABLE) GUICtrlSetState($Checkbox17, $GUI_ENABLE) GUICtrlSetState($Checkbox18, $GUI_ENABLE) Else GUICtrlSetState($Checkbox1, $GUI_DISABLE) GUICtrlSetState($Checkbox2, $GUI_DISABLE) GUICtrlSetState($Checkbox3, $GUI_DISABLE) GUICtrlSetState($Checkbox4, $GUI_DISABLE) GUICtrlSetState($Checkbox5, $GUI_DISABLE) GUICtrlSetState($Checkbox6, $GUI_DISABLE) GUICtrlSetState($Checkbox7, $GUI_DISABLE) GUICtrlSetState($Checkbox8, $GUI_DISABLE) GUICtrlSetState($Checkbox9, $GUI_DISABLE) GUICtrlSetState($Checkbox10, $GUI_DISABLE) GUICtrlSetState($Checkbox11, $GUI_DISABLE) GUICtrlSetState($Checkbox12, $GUI_DISABLE) GUICtrlSetState($Checkbox13, $GUI_DISABLE) GUICtrlSetState($Checkbox14, $GUI_DISABLE) GUICtrlSetState($Checkbox15, $GUI_DISABLE) GUICtrlSetState($Checkbox16, $GUI_DISABLE) GUICtrlSetState($Checkbox17, $GUI_DISABLE) GUICtrlSetState($Checkbox18, $GUI_DISABLE) EndIf Case $Submit sleep (1000) $Date2 = GUICtrlRead ($Day) $Date1 = GUICtrlRead ($Month) $Date3 = GUICtrlRead ($Year) $location = GUICtrlRead ($Combo1) $hookup = GUICtrlRead ($hookups) $nights = GUICtrlRead ($Number_of_Nights) GUICtrlSetData($Day, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30") GUICtrlSetData($Month,"01|02|03|04|05|06|07|08|09|10|11|12|") Call ("Example") EndSwitch WEnd Example() Func Example() Local $sCompare = 'data-icon-primary="ui-icon-plusthick"' ; Get page 1 Local $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Local $sData = BinaryToString($dData) ;ConsoleWrite ($sData & @CRLF) Local $aPage = StringRegExp($sData, '<option value="(\d+)', 3) ;_ArrayDisplay($aPage) Local $nPage = $aPage[UBound($aPage) - 1] Local $aTotal = StringRegExp($sData, '(?s)data-icon-primary="ui-icon-plusthick".*?data-title="Site\/Item #"[^\d]+(\d+)', 3) Local $iTotal = UBound($aTotal) Local $aPart ; loop thru all pages using $i as page indicator For $i = 2 To $nPage $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=" & $i & "&gotopagenow=yes&gotopage=&module=RN&multiselectlist_value=", $INET_FORCERELOAD) $sData = BinaryToString($dData) $aPart = StringRegExp($sData, '(?s)data-icon-primary="ui-icon-plusthick".*?data-title="Site\/Item #"[^\d]+(\d+)', 3) $iTotal += UBound($aPart) _ArrayConcatenate($aTotal, $aPart) Next Return SetExtended($iTotal, $aTotal) $sData = BinaryToString($dData) StringReplace($sData, $sCompare, $sCompare) $iTotal += @extended $verify = MsgBox(4, $itotal & " Sites Available", "There Are " & $iTotal & " Sites Available at " & $location & " with " & $hookup & ". " & @CRLF & @CRLF & " Do you want to continue to the reservation page?") Select Case $verify = 6 ; YES, proceed with step 1 _IECreate("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Case $verify = 7 ; NO thanks EndSelect EndFunc ;==>Example
  14. _IECreate does not seem to be working any longer not sure why maybe because it is being phased out for edge however, I tried using Chrome.exe ShellExecute("chrome.exe", "http://rtfm.com --new-window --start-fullscreen") and for some reason it does not paste the entire string with all the variables? The URL ends at "Smith"? any help would be very much appreciated. #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Camping Reservation Checker V3.0", 695, 629, -1, -1) $Pic1 = GUICtrlCreatePic("images\Camper.jpg", 16, 16, 231, 153) $Group1 = GUICtrlCreateGroup("", 256, 16, 345, 153) $Heading = GUICtrlCreateLabel("Select a Park", 328, 40, 79, 19) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Combo1 = GUICtrlCreateCombo("Smith Point", 440, 40, 145, 25) GUICtrlSetData(-1, "Cupsogue|Indian+Island|Montauk|Sears+bellows|Shinnecock+East|Southaven|West+Hills") $hookups = GUICtrlCreateCombo("Sewer", 440, 72, 145, 25) GUICtrlSetData(-1, "Basic|Electric|Outer+Beach") $Label3 = GUICtrlCreateLabel("Select Hookup", 328, 72, 84, 19) GUICtrlSetFont(-1, 9, 400, 0, "Arial") $Number_of_Nights = GUICtrlCreateCombo("4", 440, 104, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "5|6|7|8|9|10|11|12|13|14") $Label2 = GUICtrlCreateLabel("Number of Nights", 328, 104, 101, 19) GUICtrlSetFont(-1, 9, 400, 0, "Arial") GUICtrlCreateGroup("", -99, -99, 1, 1) $Submit = GUICtrlCreateButton("Click to Seaarch", 354, 558, 149, 46) GUICtrlSetFont(-1, 8, 400, 0, "MV Boli") $Label1 = GUICtrlCreateLabel("Check All Availability", 352, 187, 186, 28) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $Date = GUICtrlCreateLabel("Enter Date:", 265, 235, 70, 20) GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif") $Month = GUICtrlCreateCombo("Month", 337, 235, 65, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Month,"01|02|03|04|05|06|07|08|09|10|11|12|") $Day = GUICtrlCreateCombo("Day", 409, 235, 57, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData($Day, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30") $Year = GUICtrlCreateCombo("2021", 489, 235, 65, 25) GUICtrlSetData(-1, "2021|2022") $Checkbox1 = GUICtrlCreateCheckbox("Site 230", 301, 390, 62, 17) $Checkbox2 = GUICtrlCreateCheckbox("Site 232", 301, 414, 62, 17) $Checkbox3 = GUICtrlCreateCheckbox("Site 234", 389, 414, 62, 17) $Checkbox4 = GUICtrlCreateCheckbox("Site 236", 301, 438, 61, 17) $Checkbox5 = GUICtrlCreateCheckbox("Site 238", 389, 438, 64, 17) $Checkbox6 = GUICtrlCreateCheckbox("Site 240", 301, 462, 60, 17) $Checkbox7 = GUICtrlCreateCheckbox("Site 242", 389, 462, 63, 17) $Checkbox8 = GUICtrlCreateCheckbox("Site 244", 301, 486, 59, 17) $Checkbox9 = GUICtrlCreateCheckbox("Site 246", 389, 486, 63, 17) $Checkbox10 = GUICtrlCreateCheckbox("Site 248", 301, 510, 62, 17) $Checkbox11 = GUICtrlCreateCheckbox("Site 250", 389, 510, 63, 17) $Checkbox12 = GUICtrlCreateCheckbox("Site 245", 493, 366, 64, 17) $Checkbox13 = GUICtrlCreateCheckbox("Site 247", 493, 390, 60, 17) $Checkbox14 = GUICtrlCreateCheckbox("Site 249", 493, 414, 63, 17) $Checkbox15 = GUICtrlCreateCheckbox("Site 251", 493, 438, 61, 17) $Checkbox16 = GUICtrlCreateCheckbox("Site 253", 493, 462, 64, 17) $Checkbox17 = GUICtrlCreateCheckbox("Site 255", 493, 486, 60, 17) $Checkbox18 = GUICtrlCreateCheckbox("Site 257", 493, 510, 63, 17) $Label4 = GUICtrlCreateLabel("Ocean Side", 303, 339, 71, 20) GUICtrlSetFont(-1, 10, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label5 = GUICtrlCreateLabel("Inner Side", 494, 338, 64, 20) GUICtrlSetFont(-1, 10, 400, 4, "MS Sans Serif") GUICtrlSetColor(-1, 0x0000FF) $Label6 = GUICtrlCreateLabel(" Select Below For Smith Point Beach Top Sites !", 288, 280, 317, 21) GUICtrlSetFont(-1, 10, 400, 0, "MV Boli") $Label7 = GUICtrlCreateLabel("These Sites Are For SmithPoint Camping Only", 321, 313, 232, 17) GUICtrlSetFont(-1, 8, 400, 4, "MS Sans Serif") $MonthCal1 = GUICtrlCreateMonthCal("2021/03/03", 16, 184, 229, 196) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Combo1 If GUICtrlRead($combo1) = ("Smith Point") Then GUICtrlSetState ($Checkbox1, $GUI_ENABLE) GUICtrlSetState($Checkbox2, $GUI_ENABLE) GUICtrlSetState($Checkbox3, $GUI_ENABLE) GUICtrlSetState($Checkbox4, $GUI_ENABLE) GUICtrlSetState($Checkbox5, $GUI_ENABLE) GUICtrlSetState($Checkbox6, $GUI_ENABLE) GUICtrlSetState($Checkbox7, $GUI_ENABLE) GUICtrlSetState($Checkbox8, $GUI_ENABLE) GUICtrlSetState($Checkbox9, $GUI_ENABLE) GUICtrlSetState($Checkbox10, $GUI_ENABLE) GUICtrlSetState($Checkbox11, $GUI_ENABLE) GUICtrlSetState($Checkbox12, $GUI_ENABLE) GUICtrlSetState($Checkbox13, $GUI_ENABLE) GUICtrlSetState($Checkbox14, $GUI_ENABLE) GUICtrlSetState($Checkbox15, $GUI_ENABLE) GUICtrlSetState($Checkbox16, $GUI_ENABLE) GUICtrlSetState($Checkbox17, $GUI_ENABLE) GUICtrlSetState($Checkbox18, $GUI_ENABLE) Else GUICtrlSetState($Checkbox1, $GUI_DISABLE) GUICtrlSetState($Checkbox2, $GUI_DISABLE) GUICtrlSetState($Checkbox3, $GUI_DISABLE) GUICtrlSetState($Checkbox4, $GUI_DISABLE) GUICtrlSetState($Checkbox5, $GUI_DISABLE) GUICtrlSetState($Checkbox6, $GUI_DISABLE) GUICtrlSetState($Checkbox7, $GUI_DISABLE) GUICtrlSetState($Checkbox8, $GUI_DISABLE) GUICtrlSetState($Checkbox9, $GUI_DISABLE) GUICtrlSetState($Checkbox10, $GUI_DISABLE) GUICtrlSetState($Checkbox11, $GUI_DISABLE) GUICtrlSetState($Checkbox12, $GUI_DISABLE) GUICtrlSetState($Checkbox13, $GUI_DISABLE) GUICtrlSetState($Checkbox14, $GUI_DISABLE) GUICtrlSetState($Checkbox15, $GUI_DISABLE) GUICtrlSetState($Checkbox16, $GUI_DISABLE) GUICtrlSetState($Checkbox17, $GUI_DISABLE) GUICtrlSetState($Checkbox18, $GUI_DISABLE) EndIf Case $Submit sleep (1000) $Date2 = GUICtrlRead ($Day) $Date1 = GUICtrlRead ($Month) $Date3 = GUICtrlRead ($Year) $location = GUICtrlRead ($Combo1) $hookup = GUICtrlRead ($hookups) $nights = GUICtrlRead ($Number_of_Nights) GUICtrlSetData($Day, "01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30") GUICtrlSetData($Month,"01|02|03|04|05|06|07|08|09|10|11|12|") Call ("Example") EndSwitch WEnd Example() Func Example() Local $sCompare = 'data-icon-primary="ui-icon-plusthick"' ; Get page 1 Local $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Local $sData = BinaryToString($dData) ;ConsoleWrite ($sData & @CRLF) Local $aPage = StringRegExp($sData, '<option value="(\d+)', 3) ;_ArrayDisplay($aPage) Local $nPage = $aPage[UBound($aPage) - 1] Local $aTotal = StringRegExp($sData, '(?s)data-icon-primary="ui-icon-plusthick".*?data-title="Site\/Item #"[^\d]+(\d+)', 3) Local $iTotal = UBound($aTotal) Local $aPart ; loop thru all pages using $i as page indicator For $i = 2 To $nPage $dData = InetRead("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=" & $i & "&gotopagenow=yes&gotopage=&module=RN&multiselectlist_value=", $INET_FORCERELOAD) $sData = BinaryToString($dData) $aPart = StringRegExp($sData, '(?s)data-icon-primary="ui-icon-plusthick".*?data-title="Site\/Item #"[^\d]+(\d+)', 3) $iTotal += UBound($aPart) _ArrayConcatenate($aTotal, $aPart) Next Return SetExtended($iTotal, $aTotal) $sData = BinaryToString($dData) StringReplace($sData, $sCompare, $sCompare) $iTotal += @extended $verify = MsgBox(4, $itotal & " Sites Available", "There Are " & $iTotal & " Sites Available at " & $location & " with " & $hookup & ". " & @CRLF & @CRLF & " Do you want to continue to the reservation page?") Select Case $verify = 6 ; YES, proceed with step 1 _IECreate("https://parks.suffolkcountyny.gov/wbwsc/webtrac.wsc/search.html?Action=Start&SubAction=&rnwebsearch_search=Yes&primarycode=&begindate=" & $date1 & "%2F" & $Date2 & "%2F" & $Date3 & "&nights=" & $nights & "&category=" & $location & "&subtype=" & $hookup & "&type=FamilySite&begintime=12%3A00+am&endtime=12%3A00+am&quantity=1&keyword=&display=Listing&search=yes&page=&gotopagenow=&gotopage=1&module=RN&multiselectlist_value=", $INET_FORCERELOAD) Case $verify = 7 ; NO thanks EndSelect EndFunc ;==>Example
  15. _IECreate does not seem to be working any longer not sure why maybe because it is being phased out for edge however, I tried using Chrome.exe ShellExecute("chrome.exe", "http://rtfm.com --new-window --start-fullscreen") and for some reason it does not paste the entire string with all the variables? It stops at "Smith". any help would be very much appreciated.
×
×
  • Create New...