Jump to content

Problem writing mouse pos to text file


 Share

Recommended Posts

$pos = MouseGetPos()

$f = FileOpen("mousepos.txt",2)

$l = "x=" & $pos[0] & ", y=" & $pos[1]

FileWrite($f,$l)

FileClose($f)

I want the script to write something like "x=10, y=569" to the file mousepos.txt. But it doesn't. I get no error. Neither i get a file.. What am i doing wrong?

Edited by OnTheFly
Link to comment
Share on other sites

Do you have permission to write to that directory? Try running the script with admin privileges.

I am admin. Or, what do you mean?

Hmm.. It works when i write to another dir. So, problem solved :)

Edited by OnTheFly
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...