Jump to content

Recommended Posts

Wrote my first script and ran it on my desktop (Win 10/32bit)

#include MsgBoxConstants.au3
MsgBox($MB_OK,"My first program", "Hello World")

It errored

>"C:\Users\Linda F Newman\Desktop\..\autoit3.exe" /ErrorStdOut "C:\Users\Linda F Newman\Documents\AUTOIT\UtilityScripts\ListMacros.au3"    
'C:\Users\Linda' is not recognized as an internal or external command,
operable program or batch file.
>Exit code: 1
   

++++++++++++++++++++++++++++++++++

Copied script to my laptop (Win10/64) running the X86 version of AutoIt3.exe) and it worked perfectly.

 

Is there a config I am missing? The executables are in c:\Program Files\AutoIt3 folder on both machines and the "Hello World" scripts are in the UtilityScripts folder in "Documents\AUTOIT\UtilityScripts" on both machines.

 

Link to post
Share on other sites

The include statement needs brackets or quotes. 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
#include <MsgBoxConstants.au3>

Brackets, not parentheses, and you had them in the wrong place. Read the help file, it will definitely save you a lot of grief in the end.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to post
Share on other sites
  • Developers
19 hours ago, Gerard said:

"C:\Users\Linda F Newman\Desktop\..\autoit3.exe"

This is not a standard installation but rather a zipfile download and unpack setup.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Developers

You can use it in portable mode as well as lang as you leave the directory structure in tack, but yes..  there are differences.

Is the autoit3.exe located in:  "C:\Users\Linda F Newman\autoit3.exe" ?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Developers

You didn't move the SciTE directory either?
What is the environment setting for variables like SCITE* ?  ( output of CMD window command: Set scite  )

Jos

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Jos, thanks for your continued help.

 

The SciTE directory is at the same level and location as AutoIt3.exe.
Since I am having difficulty with my very first script you wont be shocked to learn that I do not know anything about "environment settings" and the like.

Link to post
Share on other sites
  • Developers

Open the dos prompt (CMD Window).

Type at the prompt (c:>):  SET scite   (Enter)

Cut&Paste the retuned value if any.

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites

Here is the ENTIRE command prompt session

 

"Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\Linda F Newman>SET scite
Environment variable scite not defined

C:\Users\Linda F Newman>c:\
'c:\' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Linda F Newman>c:

C:\Users\Linda F Newman>SET SciTE
Environment variable SciTE not defined

C:\Users\Linda F Newman>"

The variable appears to not have been defined.

Link to post
Share on other sites
  • Developers

Ok, there is no environment variable defined. Currently no idea why it thinks that the autoit3 program is located in the user directory.

My recommendation would be to use the installer for both AutoIt3 and the SciTE4Autoit3 to ensure all setting for Registry and Environment are set correctly.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...