This App is No Longer Maintained. Visit the Replacement at StrokesPlus.net

StrokesPlus Forum
                       
StrokesPlus Forum
Home | Profile | Active Topics
Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Lua Scripts
 General Action Scripts
 Snip & Sketch a.k.a screenshots
 Forum Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Dauren

3 Posts

Posted - 06/11/2020 :  12:19:29  Show Profile
Good day everyone! Gotta say i'm just a newbie and that's all. I really like this app, love it!

And now i wonder if there's any chance to take a screenshot anywhere with the "snip & sketch", app from Win10. Yes, you can just press WIN+SHIFT+S and that's it. But what if it's possible to execute it from strokeplus?

As far as i know "Snip & Sketch" is an application from Windows Store. It totally HAS execution file. I tried to find it in programmfiles, windowsapps etc. But i assume it's encrypted(?) I am not sure though. It's possible to run it from dekstop just by clicking. But again it's some how hidden. I apologize if just wrote a nonsense

Edited by - Dauren on 06/11/2020 12:28:41

Rob

USA
2615 Posts

Posted - 06/11/2020 :  12:40:25  Show Profile  Visit Rob's Homepage
To be honest, the easiest method is to just send WIN+SHIFT+S:

acSendKeys("@+s")

Locating Store Apps is a pain, especially since the path can change when they update the app.
Go to Top of Page

Dauren

3 Posts

Posted - 06/11/2020 :  12:46:43  Show Profile
quote:
Originally posted by Rob


Locating Store Apps is a pain, especially since the path can change when they update the app.



I know right? I found at least four folders with the same snip and sketch name and only one of them contained an executable file, even though that file was highly restricted and i couldn't get the access
Go to Top of Page

Dauren

3 Posts

Posted - 06/11/2020 :  12:50:36  Show Profile
quote:
Originally posted by Rob

To be honest, the easiest method is to just send WIN+SHIFT+S:

acSendKeys("@+s")




And thank you! Really.
It works. Bad though i didn't figure it out myself, just tried simply open it from exec app
Go to Top of Page

Rob

USA
2615 Posts

Posted - 06/12/2020 :  13:50:53  Show Profile  Visit Rob's Homepage
For whatever it's worth, you can use PowerShell to get store apps and the EXE. This is the RunStoreApp function in S+.net - you can kind of see what it's doing.

var p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.FileName = "PowerShell.exe";
p.StartInfo.CreateNoWindow = true;
p.StartInfo.Arguments = "-command get-appxpackage";
p.Start();
List<string> arrayOfLines = new List<string>();
while (!p.StandardOutput.EndOfStream)
{
    arrayOfLines.Add(p.StandardOutput.ReadLine());
}
p.WaitForExit();

foreach (var line in arrayOfLines)
{
    if (line.Contains("PackageFamilyName : "))
    {
        var appPackageFam = line.Replace("PackageFamilyName : ", "");
        if (appPackageFam.ToLower().Contains(packageName.ToLower()))
        {
            RunProgram(ExpandEnvironmentVariables("%SystemRoot%") + "\\explorer.exe", $"shell:appsFolder\\{appPackageFam}!App", "", "", false, false, false);
            break;
        }
    }
}

The packageName variable is just a string to match on, like "calc" will run the first Store App found with "calc" in the package name.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked
 Printer Friendly
Jump To:
StrokesPlus Forum © 2011-2018 Rob Yapchanyk Go To Top Of Page
Snitz Forums 2000