caramen Posted August 10, 2018 Share Posted August 10, 2018 (edited) Hello guys 2 questions... 1) How can i find my old topics to thanks user who helped me? I cant figure out how to use the search forum to see my old post that is older than 1 or 2 month. I want to thx people and check some syntaxts... 2)How can i conturn this crash : Console: "C:\Users\Jordane.guemara\Desktop\AutoIT\Nouveau dossier\Auto 5.au3" (59) : ==> Subscript used on non-accessible variable.: $Dep = _StringBetween($Ligne, '[', ']')[0] $Dep = _StringBetween($Ligne, '[', ']')^ ERROR Script: $Ligne = _GetValueInArray($aSplit, '[ANAH]') $Dep = _StringBetween($Ligne, '[', ']')[0] I tryed : If @error = 1 Then Msgbox(0,"Error","error") EndIf It work but the script is still crashing insteed of keeping while. Any suggestion ? Edited August 10, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
ajag Posted August 10, 2018 Share Posted August 10, 2018 you can't do this: $Dep = _StringBetween($Ligne, '[', ']')[0] Maybe you want this: $Dep = _StringBetween($Ligne, '[', ']') Msgbox(0,"",$Dep[0]) Rule #1: Always do a backup Rule #2: Always do a backup (backup of rule #1) Link to comment Share on other sites More sharing options...
Danp2 Posted August 10, 2018 Share Posted August 10, 2018 9 minutes ago, caramen said: How can i find my old topics to thanks user who helped me? Look under the Activity > My Active Streams. You can customize this to get what you want. For example -- https://www.autoitscript.com/forum/discover/content-posted/?&stream_club_select=undefined&stream_club_filter=undefined&stream_ownership=custom&stream_custom_members=caramen&stream_date_type=all 10 minutes ago, caramen said: $Dep = _StringBetween($Ligne, '[', ']')[0] You'll need to split this into multiple commands, like this -- $myArray = _StringBetween($Ligne, '[', ']') ; Now check either @error or IsArray() If Not @error Then $Dep = $myArray[0] Endif pixelsearch and caramen 1 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
caramen Posted August 10, 2018 Author Share Posted August 10, 2018 (edited) you can't do this: $Dep = _StringBetween($Ligne, '[', ']')[0] Maybe you want this: $Dep = _StringBetween($Ligne, '[', ']') Msgbox(0,"",$Dep[0]) Nop my script is correct and working. I just want to anticipate a missclick. That occur an error. Edited August 10, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted August 10, 2018 Author Share Posted August 10, 2018 2 minutes ago, Danp2 said: Look under the Activity > My Active Streams. You can customize this to get what you want. For example -- https://www.autoitscript.com/forum/discover/content-posted/?&stream_club_select=undefined&stream_club_filter=undefined&stream_ownership=custom&stream_custom_members=caramen&stream_date_type=all You'll need to split this into multiple commands, like this -- $myArray = _StringBetween($Ligne, '[', ']') ; Now check either @error or IsArray() If Not @error Then $Dep = $myArray[0] Endif Thx My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
pixelsearch Posted August 10, 2018 Share Posted August 10, 2018 @Danp2 : thanks for the "My active streams" link I will use it right now, to replace the few explanative pics in my posts, because these pics are on external servers and will certainly be deleted sooner or later. It seems better to upload the pics in "My attachements" on AutoIt server, then replace each external pic with the attached one. And from now on, no more external pic server in future posts Link to comment Share on other sites More sharing options...
caramen Posted August 13, 2018 Author Share Posted August 13, 2018 I got one more complicated problem about error checking. $myArray = _StringBetween($Ligne, '[', ']');Getion erreur array If Not @error Then $Dep = $myArray[0] $Role = $myArray[1] $EndURL = "/"&$myArray [2] EndIf I got this code into my script. Is there somthing with _StringBetween to do my code but with sometime an unaccessible Array [2] For exemple somthing like : If Not Array [2] Then Sleep (1) Else $EndURL = "/"&$myArray [2] EndIf My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted August 13, 2018 Author Share Posted August 13, 2018 (edited) $myArray2 = _StringBetween($Ligne, '[', ']')[2];Getion erreur array If Not @error Then $EndURL = "/"&$myArray2 Endif Not working Return an error and crash my script if my value does not exist "C:\Users\Jordane.guemara\Desktop\projet Anah\Nouveau dossier\Auto 5.au3" (64) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $myArray2 = _StringBetween($Ligne, '[', ']')[2] $myArray2 = _StringBetween($Ligne, '[', ']'^ ERROR Edited August 13, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
AutoBert Posted August 13, 2018 Share Posted August 13, 2018 Error says only 1 element in array, element 2 not found. You can use UBound for checking in code or/and (1line before crash) _arraydisplay for visuel checking my statement. Link to comment Share on other sites More sharing options...
caramen Posted August 13, 2018 Author Share Posted August 13, 2018 (edited) @AutoBert Do you got an exemple ? Edit: NVM i got it ! Thanks ! man thankd so much for all that help ! Edited August 13, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
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