0

I've been looking for a functionality that makes it so that there's a something like a crosshair which extends from the horizontal and vertical rulers to where the cursor is, like this image (taken from here), and follows it when it moves:

enter image description here

I do know that guides can be used, such as dragging from the ruler, but as far as I know, there is no shortcut to create either a horizontal or vertical guide from the mouse's current location (which is another question, similar to this).

EDIT: Note that I'd prefer something quick (as such as why I mentioned something dynamic and just follows your mouse), and I don't care much for guides staying on the screen, as I will only be using them for multiple operations in succession that won't last longer than a handful of seconds.

Also, I'm using CC 2018 if it matters.

Thanks!

1
  • what kind of use you want to get from this. because if you are talking about position of cursor you can get it by ruler ( ctrl + R ) but sadly i don't think it have such kind of feature which you are describing!
    – Mr.Online
    Commented Jun 27, 2019 at 11:30

3 Answers 3

2

While there's no way to place a guide under a cursor, you can use a script with an additional step to place guides in a specific location.

For example this script will place guides to coordinates of a Count tool. You can assign the script to a hotkey and quickly run it.

enter image description here

If your goal is having a temporary guide a 3rd party tool would work better.

function main()
{
    var units = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    try
    {
        var ref = new ActionReference();
        ref.putProperty(stringIDToTypeID("property"), stringIDToTypeID("countClass"));
        ref.putEnumerated(stringIDToTypeID("document"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt"));
        var desc = executeActionGet(ref).getList(stringIDToTypeID("countClass")).getObjectValue(0)
    }
    catch (e)
    {
        app.preferences.rulerUnits = units
        return false
    };

    createGuide(
    {
        x: true,
        coord: desc.getUnitDoubleValue(stringIDToTypeID("x"))
    });

    createGuide(
    {
        y: true,
        coord: desc.getUnitDoubleValue(stringIDToTypeID("y"))
    });

    clearCounts();

    app.preferences.rulerUnits = units

    function createGuide(guide)
    {
        guide.x == void(0) && guide.x = false;
        guide.y == void(0) && guide.y = false;

        var vertical = guide.x

        var desc9 = new ActionDescriptor();
        var desc10 = new ActionDescriptor();
        desc10.putUnitDouble(charIDToTypeID('Pstn'), charIDToTypeID('#Pxl'), guide.coord);
        desc10.putEnumerated(charIDToTypeID('Ornt'), charIDToTypeID('Ornt'), charIDToTypeID(vertical ? 'Vrtc' : 'Hrzn'));
        desc10.putEnumerated(charIDToTypeID('Knd '), charIDToTypeID('Knd '), charIDToTypeID('Dcmn'));
        var ref1 = new ActionReference();
        ref1.putIdentifier(charIDToTypeID('Dcmn'), 267);
        ref1.putIndex(charIDToTypeID('Gd  '), 1);
        desc10.putReference(charIDToTypeID('null'), ref1);
        desc9.putObject(charIDToTypeID('Nw  '), charIDToTypeID('Gd  '), desc10);
        var ref2 = new ActionReference();
        ref2.putClass(charIDToTypeID('Gd  '));
        desc9.putReference(charIDToTypeID('null'), ref2);
        desc9.putEnumerated(stringIDToTypeID('guideTarget'), stringIDToTypeID('guideTarget'), stringIDToTypeID('guideTargetCanvas'));
        executeAction(charIDToTypeID('Mk  '), desc9, DialogModes.NO);
    };

    function clearCounts() {
        var desc13 = new ActionDescriptor();
        executeAction( stringIDToTypeID('countClear'), desc13, DialogModes.NO );
    } // end of clearCounts()

}
app.activeDocument.suspendHistory("temp", "main()");
1

AFAIK you cannot do that natively with Photoshop (crosshairs that follow the mouse).

You could just drag from the top-left corner of the rulers but I can see how that will get annoying really quick, since it will reset your 0,0 coordinate to the place where you release the mouse button.

That sounds like a good use case for a tool like xScope (disclaimer: I'm not associated with the company but I've been using the toolset for quite a while), where you have crosshairs exactly as you want and many other useful tools. Worth taking a look at the free trial at least.

0

At the View Menu there are three possibilities to make guides:

enter image description here

Knowing the x,y coordinates, you can just add a horizontal and then a vertical guide setting the positions:

enter image description here

Or make a shape from the point where you want the guides exceeding the limits of the document and make a New Guide from Shape

enter image description here

2
  • I do know of the "New Guide" feature and the "New Guide From Shape" feature, but doing these two take a lot more time and I just need some line to guide my cursor to be aligned to something rasterized in the background layer (art). Perhaps I will just have the Information panel open at all times and just use shortcuts for the "New Guide" functionality if there really isn't a better alternative.
    – Moffee
    Commented Jun 27, 2019 at 12:16
  • Maybe a script, but nothing from the Photoshop features. I can't realise how this could be: Photoshop script add guides at the cursor location?
    – user120647
    Commented Jun 27, 2019 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.