Sign in to follow this  
Followers 0
OnTheFly

Problem writing mouse pos to text file

5 posts in this topic

#1 ·  Posted (edited)

$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

Share this post


Link to post
Share on other sites



$pos = MouseGetPos()
FileWrite("Mousepos.txt", "x = "&$pos[0] & "y=" & $pos[1])

Does that work?

Share this post


Link to post
Share on other sites

$pos = MouseGetPos()
FileWrite("Mousepos.txt", "x = "&$pos[0] & "y=" & $pos[1])

Does that work?

No, it doesn't :/

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

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  
Followers 0