Pokemon-Go-Controller
Pokemon-Go-Controller copied to clipboard
autoclicking prevents users from using the simulator
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.
This is a great solution, the other way had me way confused. Thanks!
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""
@dpodhorsky +1
Great solution
Nice work +1
@dpodhorsky For your problem, you have to go to System Preferences > Security & Privacy. Then, you have to add Xcode to Accessibility tap.
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