Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoclicking prevents users from using the simulator #29

Open
Kampfgnom opened this issue Jul 12, 2016 · 7 comments
Open

autoclicking prevents users from using the simulator #29

Kampfgnom opened this issue Jul 12, 2016 · 7 comments

Comments

@Kampfgnom
Copy link

You could instead add an applescript, which calls the menu item:

tell application "System Events" to tell process "Xcode"
    click menu item "pokemonLocation" of menu 1 of menu item "Simulate Location" of menu 1 of menu bar item "Debug" of menu bar 1
end tell

Currently I am running this thingy when the gpx file changes via nodemon:
nodemon -e gpx --exec osascript setlocation.applescript

This works better than the current solution.

@Jonathanwb
Copy link

This is a great solution, the other way had me way confused. Thanks!

@dpodhorsky
Copy link

I am having issues with AppleScript executing the above script. it gives error "error "System Events got an error: Can’t get menu item "pokemonLocation" of menu 1 of menu item "Simulate Location" of menu 1 of menu bar item "Debug" of menu bar 1 of process "Xcode"." number -1728 from menu item "pokemonLocation" of menu 1 of menu item "Simulate Location" of menu 1 of menu bar item "Debug" of menu bar 1 of process "Xcode""

@wangjunji
Copy link

@dpodhorsky +1

@soffchen
Copy link

Great solution

@windse7en
Copy link

Nice work +1

@HelloCore
Copy link

@dpodhorsky For your problem, you have to go to System Preferences > Security & Privacy.
Then, you have to add Xcode to Accessibility tap.

@scottiesan
Copy link

You add repeat command and eliminate the nodemond;

repeat
tell application "System Events" to tell process "Xcode"
click menu item "pokemonLocation" of menu 1 of menu item "Simulate Location" of menu 1 of menu bar item "Debug" of menu bar 1
end tell
delay 0.1
end repeat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants