Jump to content
Sign in to follow this  
BlackEvil

Opening Notepad

Recommended Posts

BlackEvil

I need to open a Notepad file from one of my folder. But it is not wqorking. Can any one help me.

My script looks like below

Run("Notepad.exe" &" " & Chr(34) & $OutputFilePath & Chr(34),@SW_MAXIMIZE)

I tried may variations but of no use.

this link and the autoit documentation says it should work. If the folder has spaces it should be enclosed in double quotes

Share this post


Link to post
Share on other sites
Xenobiologist

$OutputFilePath = "c:\Dokumente und Einstellungen\All Users\Notes\uk.dic"
Run('Notepad.exe "' & $OutputFilePath & '"', '', @SW_MAXIMIZE)


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
BlackEvil

Ooops sorry. It was my mistake. i mistaken the documentation.

This will work without any problem

Run("Notepad.exe "& $OutputFilePath)

Share this post


Link to post
Share on other sites
Xenobiologist

Ooops sorry. It was my mistake. i mistaken the documentation.

This will work without any problem

Run("Notepad.exe "& $OutputFilePath)

It won't if there are blanks in the $OutputFilePath

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites
BlackEvil

It won't if there are blanks in the $OutputFilePath

No! it works well with spaces. I used this folder " F:\My Learnings\AutoIt\My Scripts\Readme.txt "

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.