Jump to content

Recommended Posts

I need an explanation, I have the following code:

#INCLUDE <MsgBoxConstants.au3>
#INCLUDE <ExtMsgBox.au3>
#include <StringSize.au3>

$iRet = _ExtMsgBox($EMB_ICONINFO, "Man|Woman|Exit", "Select Sex", "Select Sex")
Switch $iRet
   Case 1
   $sexo = "M"
   Case 2
   $sexo = "F"
   Case Else
   MsgBox(16,"Error","Error, debe seleccionar un tipo de sexo")
EndSwitch

Send ($sexo)

The downside is that I run on windows 7 and runs fine but when I run it in Windows XP throws me this error:

"C:\Documents and Settings\BlackCrystal?\Escritorio\Proyecto para grabar denuncias al SIEDCO\Lesiones\ExtMsgBox.au3" (52) : ==> Subscript used on non-accessible variable.:
If $g_aEMB_TempArray[1] = True Then
If $g_aEMB_TempArray^ ERROR
>Exit code: 1    Time: 0.4234

In advance thank you very much.

Share this post


Link to post
Share on other sites

I put as I said, as follows:

#INCLUDE "C:\Archivos de programa\AutoIt3\Include\MsgBoxConstants.au3"
#INCLUDE "C:\Documents and Settings\BlackCrystal™\Escritorio\Proyecto para grabar denuncias al SIEDCO\Lesiones\ExtMsgBox.au3"
#include "C:\Documents and Settings\BlackCrystal™\Escritorio\Proyecto para grabar denuncias al SIEDCO\Lesiones\StringSize.au3"

$iRet = _ExtMsgBox($EMB_ICONINFO, "Man|Woman|Exit", "Select Sex", "Select Sex")
Switch $iRet
   Case 1
   $sexo = "M"
   Case 2
   $sexo = "F"
   Case Else
   MsgBox(16,"Error","Error, debe seleccionar un tipo de sexo")
EndSwitch

Send ($sexo)

 

But continues to show the same error:

>"C:\Archivos de programa\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\BlackCrystal™\Escritorio\Proyecto para grabar denuncias al SIEDCO\Lesiones\pruebas nuevas.au3"    
"C:\Documents and Settings\BlackCrystal?\Escritorio\Proyecto para grabar denuncias al SIEDCO\Lesiones\ExtMsgBox.au3" (52) : ==> Subscript used on non-accessible variable.:
If $g_aEMB_TempArray[1] = True Then
If $g_aEMB_TempArray^ ERROR
>Exit code: 1    Time: 0.3665

Also I have the AU3 files in the same directory of the script. What happens is that a virtual machine management to work alone while doing other things on W7, the strange thing is that you copy and paste the code into a new arhivo in W7 and works perfect as you see it.

Edited by JuanFelipe

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  

  • Similar Content

    • By lee321987
      Sometimes when I call several MsgBox's they start popping up under other windows, which the requires ALT + TAB or click the taskbar icon.
      I just wanted to share this workaround:
      Just add a simple GUI in your program:
      #include <GUIConstantsEx.au3> $Form1 = GUICreate("Form1", 1, 1, 0, 0) GUISetState(@SW_SHOW) The GUI window size here is 1x1 so it will be nearly invisible, and at the top-left of your screen.
      It seems as long as that GUI is there all MsgBox's appear on top!
      I only tend to create several MsgBox's in a row when I'm actually writing and testing scripts, so the GUI being there is no big deal (I just remove/comment the GUI creation right before I build the .EXE).
      Have a great day!!!
       
       
    • By editcheck
      Hi, after years of use autoit i am tired to type all time:
      msgbox('','','Hi')
      So, wanna mod the function for set default values... or some more changes.
      where is the function?
      or there are another modes for debug messages that i do not knowed ? XD [just wanna like alert('text')]
      And is there any place for all integrates functions ?
      Thank. Sry my english =E
    • By Ackerz
      Hi guys,
      So I am trying to automate a task and this task has an input box with an already set character "9". 
      I have just decided that I don't really need the input as an option but it's good to leave however for this instance I would like it to run past this point automatically. I've tried numerous ways to try and automate the use of the "OK" button using ControlClick and various other options. I just can't seem to see where this point in the script is. Scoured the forums for anything similar but didn't have any luck finding anything. Sorry to be a pain and I hope someone can help, if I haven't explained in enough detail please don't hesitate to ask for more.
      Many thanks,
      Ackerz
       
      Local $len Local $n Local $buff Local $aMyDate $Len = InputBox("Test",$msgPrompt,"9") $len = StringStripWS($len,$STR_STRIPALL) ;Check that user has entered a vaild password length if not StringIsDigit($len) or $len = 0 Then MsgBox(48,"Error","Invaild Integer was entered" & @CRLF & "Program will now exit.") Exit EndIf ;This creates the random password. for $i = 1 to $Len ;Pick a random char between 1 and the pwsMask Length $n = int(random(1,StringLen($pwsMask))) ;Concat each char that has been picked out of pwsMask to $buff $buff = $Buff & StringMid($pwsmask,$n,1) Next  
    • By xtcislove
      Hello,
      as a start in Autoit i tried something i was missing since im using Autoit. 

      I build a custom MessageBox which has a large amount of custom options and which scales its size on the parameters you set. 

      Aviable Settings:
      -Title
      -Unlimited Buttons
      -Text Color (Buttons, Text)

      -Background Color (Msgbox, Buttons, Label) 

      -Button Timeout
      -Autoclose Timeout
      -Icon (Default, No Icon, Custom)

      -Label/ Button Style. 
      -Transparency

      I tried to keep this as close as i could to a Msgbox i was used too on my batch times.

      After i was ready i realised, @Melba23 probably build a way better msgbox which would have suit my needs enterly, anyway thanks to @Melba23 because i use his Stringsize UDF. 

       
       
      local $Message = _sMsgBox("Test", 6, "Continue?") if @extended <> -1 Then MsgBox(0, @extended, $Message&" Button pressed")  
      ScalingMessageBox.au3
    • By SkysLastChance
      I am having a hard time understanding why this is not working. I was hoping some one could help explain it to me. 
      $tags = $oIE.document.GetElementsByTagName("input") For $tag in $tags $class_value = $tag.GetAttribute("class") If string($class_value) = "fTs-p3298-l0 wplEditControl" Then $target = $tag ExitLoop EndIF Next MsgBox(0,"",$target) If $target = "fTs-p3298-l0 wplEditControl" THEN MsgBox(0,"","itworked") I have tried 
       MsgBox(0,"",$target.Attribute)  MsgBox(0,"",$target.Value)  MsgBox(0,"",$target.InnerText) I would expect to see this in the msgbox
      fTs-p3298-l0 wplEditControl  
×
×
  • Create New...