Jump to content
Sign in to follow this  
BigDaddyO

Maps => Variable subscript badly formatted

Recommended Posts

I'm trying to use Maps for the first time (Never knew they were available until I read through the release notes) but Scite keeps throwing an error on run about Variable subscript badly formatted.

I tried to run the script directly from AutoIT and it also threw an error.

I've got the latest 3.3.14.5 and just re-installed Scite.  

Below is a quick sample that I put together that throws the error in Scite as well as if I run it with the AutoIT Run a script.

#include <GUIConstantsEx.au3>

Local $mBug[] ;==> Variable subscript badly formatted
$mBug.Width = 1100
$mBug.Height = 700
$mBug.GUI = GUICreate("Defect Details", $mBug.Width, $mBug.Height)
GUISetState(@SW_SHOW, $mBug.GUI)

;~ $iW = 1100
;~ $iH = 700
;~ $hGUI = GUICreate("Defect Details", $iW, $iH)
;~ GUISetState(@SW_SHOW, $hGUI)

While 1
    Switch GUIGetMsg()

        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

I tried searching the forum for Maps and it's only talking about Beta which I don't have installed.

 

so, what am I doing wrong?

 

Thanks,

Mike

Edited by BigDaddyO

hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites

The newest Beta release has this disclaimer:

Quote

Warning: This feature is experimental. It may not work, may contain bugs or may be changed or removed without notice.

DO NOT REPORT BUGS OR REQUEST NEW FEATURES FOR THIS FEATURE.

As this feature is very much a question mark right now, there will be no support for issues with it.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

If that's the case, then the Help file needs to be fixed in the latest release since that's where I read about it.

 

ScreenCap_20.JPG


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites

As mentioned, this disclaimer is in the latest release (15.1 IIRC). I have heard that an oversight cause it not to be in the previous release.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

Just guess: Try to dowmload latest beta au3check.exe from here:

https://www.autoitscript.com/site/autoit-script-editor/downloads/

https://www.autoitscript.com/autoit3/scite/download/beta_SciTE4AutoIt3/

It's probably only au3check syntax check error. If this new "Map" syntax isn't implemented in au3check yet then disable au3check in your script by directve

#AutoIt3Wrapper_Run_AU3Check=n

 

EDIT: Also look here (specially Melba's reply)

 

Edited by Zedna

Share this post


Link to post
Share on other sites

@Zedna It's not the au3check as I tried to run the script directly with AutoIT without Scite and it threw an error.  So, i'm sure it's just not available in the latest release and it just needs the Maps stuff removed from the help file.


hmm... I guess I have to have a signature...

Share this post


Link to post
Share on other sites

After an year same problem... I was mislead by documentation "Errors"..

 

Please look at these examples:

Spoiler

 

image.thumb.png.f1407a939d036483d98559524f6f6ccb.png

 

  • While on the wiki is said to be under development and that the correct implementation has to be made using Associative Arrays

image.png.3a3ed2ede0a17b428a98ce445598dab0.png

 

 

 

My question here is the following: 

Should we use the Wiki or the Documentation as "documentation" (sorry for the word pun 😄) since the first seems updated more recently?

Share this post


Link to post
Share on other sites
39 minutes ago, LukeSavefrogs said:

Should we use the Wiki or the Documentation as "documentation" (sorry for the word pun 😄) since the first seems updated more recently? 

The wiki is more of a community effort as I see it. In any case, the documentation (help file) is the official support resource which comes packed in the installer. Use the help file for any solid references and the wiki for everything else.


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Bhooshan
      I need to mute an ongoing call on Microsoft teams without activating the window. Teams allows us to mute using shortcut key Ctrl+Shift+m but only when the window is active.
      # Used set option as ongoing call can be with any person which leads to change in Title Name.
      AutoItSetOption ( "WinTitleMatchMode", 2 ) 
      # I am not clear with the control ID which will be good to use here and also the key combination of ^M       
      ControlSend ( "Microsoft Teams", "", "[CLASS:Intermediate D3D Window; INSTANCE:1]", "{ctrl down}")
       
      Can anyone help...!!! 
       

    • By Sayed
      Hi there, 
      I'm new in AutoIt forms and using AutoIt to automate desktop application (able to automate the application normally but facing issue when I've to re-run the application twice within the same script...so need help in this please)
      here is the steps then followed by the issue in a brief : 
      1- run application . 
      2- do some actions (click menus,activate windows,set texts..)
      3- close the application. 
      4- run the application again & access the same controls.
      5- open the same windows again (like step 2)
      6- perform some validations (by getting texts from some text boxes)
      7- close the application again (and repeat 1-7 for 15 times in average )
      The issue 
      * all controls are accessible in the first run and actions done successfully on controls (for steps 1-3) BUT from the second run of the application from step-4 it's able to set focus only the main application window.
      Note: only unique properties used to while mapping the controls. 
      Error that appear in the console :
      UIAWrappers.au3" (1673) : ==> Array variable has incorrect number of subscripts or subscript dimension range exceeded.: $x = Int($t[1] + ($t[3] / 2)) $x = Int($t[1] + (^ ERROR  
      Simple spy code  of one of the controls that has this strange issue(menubar&view menu Item): 
      ;~ *** Standard code maintainable *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("oP1","Title:=XXX;controltype:=UIA_WindowControlTypeId;class:=WindowsForms10.Window.8.app") ;main app form xxx _UIA_setVar("oP2","Title:=menuStrip1;controltype:=UIA_MenuBarControlTypeId;class:=WindowsForms10.Window.8.app") ;menuStrip1 ;~ $oUIElement=_UIA_getObjectByFindAll("View.mainwindow", "title:=View;ControlType:=UIA_MenuItemControlTypeId", $treescope_subtree) _UIA_setVar("oUIElement","Title:=View;controltype:=UIA_MenuItemControlTypeId;class:=") ;ControlType:=UIA_MenuItemControlTypeId;classname:=") ;~ Actions split away from logical/technical definition above can come from configfiles ;~_UIA_Action("oP1","highlight") _UIA_Action("oP1","setfocus") ;~_UIA_Action("oP2","highlight") _UIA_Action("oP2","setfocus") _UIA_action("oUIElement","highlight") ;~_UIA_action("oUIElement","click")  
       
    • By Fenzik
      Hello All!
      i suggest to set default encoding in Scite4 for Autoit 3 to UTF 8 with Bom encoding, format recommended also in Autoit Help.
      In last editor version, when i open new script, for example Czech characters (č, ř, ž) aren't correct.
      So when i change Encoding to UTF 8 with Bom from Default Code page property state, everithing seems to be OK.
      Thank you and sorry for potentialy duplicated content.
      Fenzik
    • By jitb
      I have an eof problem in SciTE. I keep gitting this knitsu at the end of the open sesion.
      Please see below. The file should end at line 1220 but has invisable lines. What am I doing wrong?
    • By AutoitMike
      Scite 3.4.4
      Win 10
      I click "Help" or press F1, there is no response
      If I use the file explorer and double click Autoit.chm or Autoit3.chm help opens.
      There is no dialog to check or uncheck "Always ask before opening this file" when clicking on these files.
       
      If you are curious as to why I dont have the latest version, I am creating a back up laptop that has a VERY extensive automation application that I have written over the past 15 years.
       
      An extremely potent, powerful, needed function has been deleted in the upgrade of Autoit in recent years that I can not do without. If my main laptop dies, which it almost did, I am in a very bad position. So I bought the exact same laptop and I am "cofiguring" it to work exactly the same as my main laptop. However, this one has been "Upgraded" to Win 10 which I hope is not the problem. 
      Thanks for any help
×
×
  • Create New...