Disable Snap to as a script? then enable

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

Mcquiff

Disable Snap to as a script? then enable

Post by Mcquiff »

I need to add this to script so that I can adjust some guidelines without having to go to the menu to disable or use Ctrl button.

Then another script to enable.

Is this possible?

Thanks

Matt

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

pfaffenbichler

Disable Snap to as a script? then enable

Post by pfaffenbichler »

Are you talking about the Preferences?
Mcquiff

Disable Snap to as a script? then enable

Post by Mcquiff »

Possibly.Not sure?

Photoshop>View>Snap

Just looking to toggle this in script form.

Mattt
pfaffenbichler

Disable Snap to as a script? then enable

Post by pfaffenbichler »

Have you tested whether it produces AM code with ScriptingListener.plugin?
Mcquiff

Disable Snap to as a script? then enable

Post by Mcquiff »

I tried that and nothing happens.

I have a script that draws a few guidelines then I want the user to adjust them, but I want to make sure they don't snap at all.
pfaffenbichler

Disable Snap to as a script? then enable

Post by pfaffenbichler »

Code: Select allapp.runMenuItem(stringIDToTypeID("snap"))

Though so far I have not been able to have a Script verify whether the feature is on or off.
Mcquiff

Disable Snap to as a script? then enable

Post by Mcquiff »

'Yes appears to just toggle it from on to off and then vice versa
Is it possible to check the state if ticked or not?
Still helpful nonetheless Thanks.

Matt
pfaffenbichler

Disable Snap to as a script? then enable

Post by pfaffenbichler »

Interesting problem, but I have not been successful in retrieving the current state/value/… of the menu item.
Maybe someone else has more insight.
Mcquiff

Disable Snap to as a script? then enable

Post by Mcquiff »

I had this working ok as I runs script that disables it. and then I run another script that then re enables it.

However if the last thing you did was to disable it, and you exit photoshop, the next time you open it, it remembers it. like rulers and grids works.

So need to definitely find a way to check if it is ticked or not.
pfaffenbichler

Disable Snap to as a script? then enable

Post by pfaffenbichler »

Maybe you should start a new thread to attract additional attention.