Jump to content

Recommended Posts

Posted

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.

Posted (edited)

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
  • Moderators
Posted

In the future, could you also please invest the half-second required to give a meaningful title to your posts? This is General Help & Support, so a title of Help Me! doesn't really tell us much ;)

"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!

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
×
×
  • Create New...