Ace08 2 Posted September 28, 2010 hi guys how can i open a text file in a notepad? so far i've tried the following and none worked.... $sTextFile = "C:\script\test.text" Run($sTextFile); does'nt open the file no error either Run("notepad.exe" $sTextFile); same with this Run("notepad.exe" & $sTextFile) Run("notepad.exe", $sTextFile) Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites
wakillon 403 Posted September 28, 2010 hi guys how can i open a text file in a notepad? so far i've tried the following and none worked.... $sTextFile = "C:\script\test.text" Run($sTextFile); does'nt open the file no error either Run("notepad.exe" $sTextFile); same with this Run("notepad.exe" & $sTextFile) Run("notepad.exe", $sTextFile) you forget the space after notepad ! Try Run ( "notepad.exe " & $sTextFile, @WindowsDir, @SW_MAXIMIZE ) 1 sulfur reacted to this AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
Ace08 2 Posted September 28, 2010 thanks wakillon... so the cause of my 2 hrs frustration was due to a missing space now thats one thing i definitely need to remember. Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites
wakillon 403 Posted September 28, 2010 thanks wakillon... so the cause of my 2 hrs frustration was due to a missing space now thats one thing i definitely need to remember. for this error type i use a simple method : $_Run = "notepad.exe" & $sTextFile ConsoleWrite ( "$_Run : " & $_Run & @Crlf ) Run ( $_Run, @WindowsDir, @SW_MAXIMIZE ) With ConsoleWrite you'll see that space is missing ! 1 VenusProject2 reacted to this AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
Ace08 2 Posted September 28, 2010 thank you so much for the help wakillon Work smarter not harder.My First Posted Script: DataBase Share this post Link to post Share on other sites
wakillon 403 Posted September 28, 2010 thank you so much for the help wakillon Glad to help you ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
sebastiian 0 Posted November 7, 2018 ¿Y como quedaría el código? Share this post Link to post Share on other sites
sebastiian 0 Posted November 7, 2018 2 minutes ago, sebastiian said: ¿Y como quedaría el código? $sTextFile = "C:\hola_mundo.txt" Run ( "notepad.exe " & $sTextFile, @WindowsDir, @SW_MAXIMIZE ) Share this post Link to post Share on other sites