Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Export to Paw automation script
// First make sure that you have granted access to Automator, Xcode and Paw in accessibility section in Security & Privacy settings.
// Then create a new Service workflow in Automator with following actions:
1. Copy to clipboard
2. Launch Application: "Paw"
3. Run AppleScript:
tell application "System Events"
tell process "Paw"
click menu item "Text" of menu 1 of menu item "Import" of menu 1 of menu bar item "File" of menu bar 1
tell application "System Events" to keystroke "v" using {command down}
click button "Import" of sheet 1 of window 1
delay 1
click button "Import" of sheet 1 of window 1
delay 1
click button "OK" of sheet 1 of window 1
delay 1
// this works in a empty project, but not in the project with groups of requests
// so you might need to remove it
select last row of outline 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1
tell application "System Events" to keystroke return using {command down}
end tell
end tell
// Now you will be able to export your requests logs to Paw using Services from context menu just with one click.
// Make sure that logs are in one of the formats supported by import extensions you have installed in Paw (i.e. curl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment