Jump to content

Error question


Recommended Posts

 

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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

@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

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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

$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 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

@AutoBert Do you got an exemple ?

 

Edit: NVM i got it ! Thanks ! man thankd so much for all that help ! :) 

Edited 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 - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...