Jump to content

Basic script error.


Recommended Posts

Hey, Just started AutoIT. Working though help atm.

Doing 2nd example.

I have it loaded, the code is..

Run("notepad.exe")

And i get an error when trying to load.

C:\DOUME~1\af\Desktop\AUTOIT\AA\Learning\notepad.exe
X#=0D, CS=00C7 IP=00002725. The NTVDM CPU has encountered an unhandled exeption. Choose 'Close' to terminate the application.

Yeh...Any ideas? :S

Cheers in advance.

Link to comment
Share on other sites

Hey, Just started AutoIT. Working though help atm.

Doing 2nd example.

I have it loaded, the code is..

Run("notepad.exe")

And i get an error when trying to load.

C:\DOUME~1\af\Desktop\AUTOIT\AA\Learning\notepad.exe
X#=0D, CS=00C7 IP=00002725. The NTVDM CPU has encountered an unhandled exeption. Choose 'Close' to terminate the application.

Yeh...Any ideas? :S

Cheers in advance.

Are you compiling your script as a file named "notepad.exe" (that's how it appears at first glance). If so, rename your compiled script - I would expect that your script, rather than grabbing Windows Notepad from its location (as defined in your system's environment variables), is instead referencing the local directory copy, thus itself, and looping until crashing.

If this is the case, renaming it should resolve the error.

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

Are you compiling your script as a file named "notepad.exe" (that's how it appears at first glance). If so, rename your compiled script - I would expect that your script, rather than grabbing Windows Notepad from its location (as defined in your system's environment variables), is instead referencing the local directory copy, thus itself, and looping until crashing.

If this is the case, renaming it should resolve the error.

My file name is named something like..."Npad.au3"

I moved shortcut of notepad into same folder as the .au3 incase that fixed it, Which it didn't.

How do i fix it to grab from its location? Instead of only searching the folder .au3 is in?

Cheers..

Link to comment
Share on other sites

My file name is named something like..."Npad.au3"

I moved shortcut of notepad into same folder as the .au3 incase that fixed it, Which it didn't.

How do i fix it to grab from its location? Instead of only searching the folder .au3 is in?

Cheers..

On a standard system, just using Run("notepad.exe") would be expected to work (it's located in a path defined in your Windows standard Environment Variables). If you wanted to define the full path for a program you could do so within the quotes, for this, or any other program you wanted to launch. In the case of Notepad with the full path defined, you could either use:

Run("C:\Windows\System32\notepad.exe")

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

Link to comment
Share on other sites

Searching Google for your "NTVDM CPU" error didn't yield anything (quickly) helpful, but hopefully the above entry will be of use as you continue learning/testing AutoIt.

- MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup]

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...