Jump to content

FileOpen or Run?


xmen
 Share

Recommended Posts

I am newbie in Autoit, so a lot to learn from, i got a problem here, after searching the forum inside and manual file, no answer for me, so i got to ask in here.

FileOpen ("c:\abc.txt", 0) ; doesn't open it in notepad or wordpad for reading

instead, i got to use ultra edit / notepad to open it

run('C:\Program Files\UltraEdit\uedit32.exe "c:\abc.txt"')

Hope someone to explain me, millions thanks

Link to comment
Share on other sites

if you use FileOpen remember FileClose too...

Btw, you may find useful for starting files with associated program:

Func _ShellExecuteDllCall($sCmd, $sVerb, $sArg, $sFolder)
  ;return will be a int greater than 0 if something goes wrong.
   Local $aRet

   $aRet = DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", $sVerb, _
         "string", $sCmd, "string", $sArg, "string", $sFolder, "long", @SW_SHOWNORMAL)
   Return $aRet[0] - 32
EndFunc  ;==>_ShellExecuteDllCall
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...