<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>DisplayFusion RSS: Application.Start Windows Store App Help</title>
<atom:link href="https://www.displayfusion.com/Discussions/RSS/?TopicID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2" rel="self" type="application/rss+xml" />
<link>https://www.displayfusion.com/Discussions/RSS/?TopicID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2</link>
<description>DisplayFusion RSS: Application.Start Windows Store App Help</description>
<lastBuildDate>Thu, 28 May 2026 16:27:52 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.displayfusion.com/Discussions/RSS/?TopicID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2</generator>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#19</link>
<pubDate>Tue, 22 Sep 2020 20:16:18 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#19</guid>
<category>DisplayFusion</category>
<description><![CDATA[You should be able to get the window by using the process filename like in your first example:
IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");
That GetMainWindowByAppID
function isn't for Metro app IDs, it's something different. You can use it like this:
Code
Copy...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You should be able to get the window by using the process filename like in your first example:<br/>
<br/>
<div class="Inline"><pre>IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");</pre></div><br/>
<br/>
That <div class="Inline"><pre>GetMainWindowByAppID</pre></div> function isn't for Metro app IDs, it's something different. You can use it like this:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea1f75c29d6bb1a73ed41265" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea1f75c29d6bb1a73ed41265Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea1f75c29d6bb1a73ed41265Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">uint appID = BFS.Application.Start("notepad.exe");
IntPtr window = BFS.Application.GetMainWindowByAppID(appID);</pre><textarea id="code019e6f69ea1f75c29d6bb1a73ed41265" name="code019e6f69ea1f75c29d6bb1a73ed41265" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Hope that makes sense!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#18</link>
<pubDate>Sun, 20 Sep 2020 02:15:22 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#18</guid>
<category>DisplayFusion</category>
<description><![CDATA[I finally got around to downloading the beta.  I hadn't messed with my scripts in awhile since I redid my pc room and switched a few of my monitors to portrait mode.
Anyway I'm finally going to give it a shot but I'm not sure exactly how you fixed the issue.   I'll try a few different methods bu...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I finally got around to downloading the beta.  I hadn't messed with my scripts in awhile since I redid my pc room and switched a few of my monitors to portrait mode.<br/>
<br/>
Anyway I'm finally going to give it a shot but I'm not sure exactly how you fixed the issue.   I'll try a few different methods but did you make it so that I can point to the metro app by it's exe or by it's Metro (Universal App ID ?  so that I can later focus it that is.<br/>
<br/>
Using the ZTwitch Metro ~ Microsoft store app for example.  <br/>
Would it be like this?<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea2f73e0bba44618903f2102" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea2f73e0bba44618903f2102Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea2f73e0bba44618903f2102Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">//get the main window of zTwitch app by it's executable name
IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");</pre><textarea id="code019e6f69ea2f73e0bba44618903f2102" name="code019e6f69ea2f73e0bba44618903f2102" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
The full location of the exe is:<br/>
C:\Program Files\WindowsApps\76Chococode.Twitch.tvforWindows10_1.17763.124.0_x64__crad18n2hztbr\TwitchUWP.exe<br/>
<br/>
or should I be trying to use Get by the app ID ?<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea3172fdb9c88a570ec36121" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea3172fdb9c88a570ec36121Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea3172fdb9c88a570ec36121Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">//get the main window of zTwitch app by it's AppID
IntPtr mainWindow = BFS.Application.GetMainWindowByAppID("76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App");</pre><textarea id="code019e6f69ea3172fdb9c88a570ec36121" name="code019e6f69ea3172fdb9c88a570ec36121" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
 I've been launching the ZTwitch metro app by the app ID like the example you showed me earlier in this thread.  I just need to know what code to use to Get the window by file or App ID in the displayfusion beta rather than the GetWindowByText method I had been using before.<br/>
<br/>
    <br/>
thanks again for any help.  It's taking a little time to redo my pc and all of my window positions in my new monitor array.  Getting the Metro apps quicker like regular exes for further operations would be a big difference.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#17</link>
<pubDate>Wed, 19 Aug 2020 16:19:19 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#17</guid>
<category>DisplayFusion</category>
<description><![CDATA[We've just released a new DisplayFusion beta version and this issue should be all fixed up. Please let us know if you run into any trouble after updating.
Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
We've just released a new DisplayFusion beta version and this issue should be all fixed up. Please let us know if you run into any trouble after updating.<br/>
<br/>
Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#16</link>
<pubDate>Sat, 15 Aug 2020 12:49:23 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#16</guid>
<category>DisplayFusion</category>
<description><![CDATA[Great news and thanks for providing the window state format example in that snippet.  I'll give it a shot.
In regard to the other operations by exe not working on sandboxed windows, I'm still using the search by text method for now on those UWP applications.  It works but there is some lag so it...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Great news and thanks for providing the window state format example in that snippet.  I'll give it a shot.<br/>
<br/>
In regard to the other operations by exe not working on sandboxed windows, I'm still using the search by text method for now on those UWP applications.  It works but there is some lag so it's nowhere near as clean as using the other code that operates on the exe directly.<br/>
<br/>
I've considered swapping out the window restore to position (x, y, w, h) part of the function to instead just load a saved window position profile name (if possible), for the UWP app functions..   but that would restore all of my saved window positions instead of being able to micromanage each app by it's own hotkey like playing cards/tiles the way I am doing it now.  I'd also still have to operate by text of the window name in order to check if it's minimized/minimize it/"restore" by loading window positions profile.<br/>
<br/>
If there was a way to save and later load a window position profile that referenced only one particular app window (while not minimizing the rest) it would probably do the same thing in the end as restoring by exe.  I could then just launch that window position profile as the restore for that singular UWP store app without restoring (or minimizing) all of my other windows at the same time.  The profile load might end up being as laggy as the text method in the end though potentially.<br/>
<br/>
So I'm still looking forward to a future version of DisplayFusion where I can hopefully operate directly on the exe or other direct reference/ID of the UWP store/sandboxed apps (rather than search by text) to minimize, restore or move to exact position I set like I can do on regular non UWP microsoft store sandboxed apps. <br/>
<br/>
Love this app and the support here is solid.  Thanks again.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#15</link>
<pubDate>Thu, 13 Aug 2020 16:23:58 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#15</guid>
<category>DisplayFusion</category>
<description><![CDATA[The Toggle Always On Top function will work on UWP app windows
You can check if it's enabled as well, like this:
Code
Copy
Select All
if (BFS.Window.HasWindowStyleEx(BFS.WindowEnum.WindowStyleEx.WS_EX_TOPMOST, windowHandle))
{
// do something
}
Hope that helps!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
The Toggle Always On Top function will work on UWP app windows <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" /><br/>
<br/>
You can check if it's enabled as well, like this:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea4972f497f09238d95210ab" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea4972f497f09238d95210abJs'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea4972f497f09238d95210abJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">if (BFS.Window.HasWindowStyleEx(BFS.WindowEnum.WindowStyleEx.WS_EX_TOPMOST, windowHandle))
{
    // do something
}</pre><textarea id="code019e6f69ea4972f497f09238d95210ab" name="code019e6f69ea4972f497f09238d95210ab" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Hope that helps!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#14</link>
<pubDate>Wed, 12 Aug 2020 14:13:40 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#14</guid>
<category>DisplayFusion</category>
<description><![CDATA[I haven't tried any new beta versions if they have been released recently but I'm still hopeful that the UWP windows store apps that run in a sandbox will get supported more directly in future versions of DisplayFusion.
I'd like to bring up another issue with them and ask a question in general....]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I haven't tried any new beta versions if they have been released recently but I'm still hopeful that the UWP windows store apps that run in a sandbox will get supported more directly in future versions of DisplayFusion.<br/>
<br/>
I'd like to bring up another issue with them and ask a question in general.  <br/>
<br/>
As you can see, windows store apps are beginning to get like phone/tablet "kiosk"-ware so are more difficult to manage and operate on.  Apparently since they run in a sandbox, "always on top" functionality doesn't work with them either.  I'm about to test this out with the "Set Window Always on Top" function I downloaded from the DisplayFusion library but I suspect that it won't work on sandboxed Microsoft Store apps.<br/>
<br/>
If you could, aside from the sandbox issue,  please let me know if there is a way with proper code to check for the Always on Top state.  I know the function sets the state using:<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea52706a80bf1ca883e4e324" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea52706a80bf1ca883e4e324Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea52706a80bf1ca883e4e324Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">//make the window always on top
        BFS.Window.SetAlwaysOnTop(windowHandle, true);</pre><textarea id="code019e6f69ea52706a80bf1ca883e4e324" name="code019e6f69ea52706a80bf1ca883e4e324" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
but I'd like to test if it is false first so that I can make the function a toggle. In a flow chart type layout this is what I'd like to do:<br/>
<br/>
If SetAlwaysonTop == false -&gt; then SetAlwaysOnTop(WindowHandle, true);   else SetAlwaysOnTop(WindowHandle, false);<br/>
<br/>
I've edited scripts to test for open?/minimized?/not minimized? as a toggle similarly, I just don't know the proper format to test the AlwaysOnTop parameter for being true/false. I only how to set the parameter as true/false from the sample code.  <br/>
<br/>
If I can get that working I'd also set a red frame outline around the always on top windows which toggles with their on/off state as well. Hopefully that will be easy from looking at other existing functions that frame windows.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#13</link>
<pubDate>Thu, 23 Jul 2020 17:59:19 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#13</guid>
<category>DisplayFusion</category>
<description><![CDATA[Excellent, the appID thing should help with launching. As for getting the main window I have a case opened for our developers. We should have a beta out next week for testing.]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Excellent, the appID thing should help with launching. As for getting the main window I have a case opened for our developers. We should have a beta out next week for testing. <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#12</link>
<pubDate>Wed, 22 Jul 2020 20:08:22 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#12</guid>
<category>DisplayFusion</category>
<description><![CDATA[As I said, some of the apps show the right ID and so I can launch them with the proper code, but thanks I'll try that out for the ones that don't list the proper one. If it works it would help with -launching- apps.
However I still can't focus or "Get" the running microsoft store apps by the app...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
As I said, some of the apps show the right ID and so I can launch them with the proper code, but thanks I'll try that out for the ones that don't list the proper one. If it works it would help with -launching- apps.<br/>
<br/>
However I still can't focus or "Get" the running microsoft store apps by the app ID ~ exe name.   For example this works with regular apps but not metro apps.<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea5c729ba2904c2003dcf3d5" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea5c729ba2904c2003dcf3d5Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea5c729ba2904c2003dcf3d5Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*SomeRegularApp.exe");</pre><textarea id="code019e6f69ea5c729ba2904c2003dcf3d5" name="code019e6f69ea5c729ba2904c2003dcf3d5" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
so I'm instead forced to use the window text search method which is slower and can be clunky so is not desirable.  <br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea5e71ffaabfe1677949ca47" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea5e71ffaabfe1677949ca47Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea5e71ffaabfe1677949ca47Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">string windowTitle = "MiscMetroAppTitle";

// Focus the window
IntPtr mainWindow = BFS.Window.GetWindowByText("*" + windowTitle + "*");</pre><textarea id="code019e6f69ea5e71ffaabfe1677949ca47" name="code019e6f69ea5e71ffaabfe1677949ca47" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
I'm admittedly a novice. Putting together snippets of code from other functions has been working ok so far but is there any way to focus running metro apps by file directly (or some other way directly that is consistent on different launches of the app) without a slower and somewhat sloppier search by window title?   All of my regular app's windows are able to be focused with the GetMainWindowByFile method. Those regular apps using that method are focused and operated on reliably and pretty much instantaneously while the search by text I'm resorting to with the metro apps is slower and less reliable.
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#11</link>
<pubDate>Wed, 22 Jul 2020 18:25:30 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#11</guid>
<category>DisplayFusion</category>
<description><![CDATA[I would recommend using Window Inspector to look at the application window and grab the correct app ID:
https://www.binaryfortress.com/WindowInspector/Download/
I don't think the string with "ApplicationFrameHost.exe" in it is the correct app ID, and that might be the issue. This inspector appl...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I would recommend using Window Inspector to look at the application window and grab the correct app ID:<br/>
<a href="https://www.binaryfortress.com/WindowInspector/Download/" target="_blank" rel="nofollow"><b>https://www.binaryfortress.com/WindowInspector/Download/</b></a><br/>
<br/>
I don't think the string with "ApplicationFrameHost.exe" in it is the correct app ID, and that might be the issue. This inspector application will show you the correct ID to use. <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-smile.light.svg" alt=":)" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":)" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#10</link>
<pubDate>Wed, 22 Jul 2020 16:43:31 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#10</guid>
<category>DisplayFusion</category>
<description><![CDATA[Sorry for the delay.  I appreciate your direct support.
It is a problem, at least for me,  with any windows store apps since they don't launch directly by their listed exe link/shortcut. Windows doesn't even allow making shortcuts from windows store apps by default.   I can open a list of all my...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Sorry for the delay.  I appreciate your direct support.<br/>
<br/>
It is a problem, at least for me,  with any windows store apps since they don't launch directly by their listed exe link/shortcut. Windows doesn't even allow making shortcuts from windows store apps by default.   I can open a list of all my apps from powershell and make shortcuts to the desktop and move them to wherever from there. Then I can reference that shortcut in order to launch the app as a workaround.<br/>
<br/>
Focusing on the apps doesn't work by their Application ~ exe so scripts and code snippets that focus and operate on apps by exe don't work. <br/>
<br/>
BFS.Application.GetMainWindowByFile<br/>
<br/>
and even BFS.Application.GetMainWindowByAppID fails to work on some of them (more details below).<br/>
<br/>
So I have to resort to focusing on them by text name which isn't as quick and is potentially more buggy at times, using<br/>
<br/>
BFS.Window.GetWindowByText<br/>
<br/>
It seems odd that the DisplayFusion taskbar shortcuts for windows store/metro style apps works to launch them just fine, and for some like the zTwitch version Keith replied with, the "Metro (Universal) App ID" works (for launching, not for focusing.. focusing ~ BFS.Get  by file doesn't work)<br/>
<br/>
For example the code Keith replied to me with here works to launch some types of windows store apps:<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69ea7d76bf85a64fb442366654" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69ea7d76bf85a64fb442366654Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69ea7d76bf85a64fb442366654Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">uint appID = BFS.Application.Start("C:\\Windows\\explorer.exe", "shell:appsFolder\\76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App");</pre><textarea id="code019e6f69ea7d76bf85a64fb442366654" name="code019e6f69ea7d76bf85a64fb442366654" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
But for some, the Metro(Universal)App ID is listed as "ApplicationFrameHost.exe" so it still doesn't work.  <br/>
The application heading itself shows the program path and exe, but for the windows store metro apps, pointing to that location doesn't work directly.<br/>
<br/>
For example, when I look up (choose edit) on the DisplayFusion taksbar item for the FooIRC app from the windows store, <br/>
it lists this in the application line:<br/>
C:\Program Files\WindowsApps\62199Synfron.FooIRC_3.11.4.0_x64__f5vwe4t7vzxt6\FooIRC.UWP.exe<br/>
<br/>
and this in the Metro(Universal) App ID:<br/>
{1AC14E77-02E7-4E5D-B744-2EB1AE5198B7}\ApplicationFrameHost.exe
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#9</link>
<pubDate>Tue, 14 Jul 2020 16:06:20 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#9</guid>
<category>DisplayFusion</category>
<description><![CDATA[@elvn: Can you please post a link to the app that you're having issues with so we can test with the upcoming version? Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
@elvn: Can you please post a link to the app that you're having issues with so we can test with the upcoming version? Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#8</link>
<pubDate>Mon, 13 Jul 2020 20:00:57 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#8</guid>
<category>DisplayFusion</category>
<description><![CDATA[I can confirm that this is an issue with UWP apps and I've added into our tracking system to try and get it fixed up for the next release. Thanks!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I can confirm that this is an issue with UWP apps and I've added into our tracking system to try and get it fixed up for the next release. Thanks!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#7</link>
<pubDate>Mon, 13 Jul 2020 15:52:51 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#7</guid>
<category>DisplayFusion</category>
<description><![CDATA[The metro app BFS.Application.Start code you replied with works flawlessly.
However BFS.Application.GeMainWindowByFile in order to get the metro app by it's exe is not working.  I can make it work with the text search method.  I'd really prefer that I could get the metro app by .exe though rathe...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
The metro app BFS.Application.Start code you replied with works flawlessly. <br/>
<br/>
However BFS.Application.GeMainWindowByFile in order to get the metro app by it's exe is not working.  I can make it work with the text search method.  I'd really prefer that I could get the metro app by .exe though rather than the window text search method because the .exe method is lightning fast and the text search method is not.  It is slow and can be clunky.<br/>
<br/>
So this still doesn't work:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69eaa4752ba37d5153ddedd8fe" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69eaa4752ba37d5153ddedd8feJs'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69eaa4752ba37d5153ddedd8feJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">//get the main window of zTwitch app by it's executable name
IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");</pre><textarea id="code019e6f69eaa4752ba37d5153ddedd8fe" name="code019e6f69eaa4752ba37d5153ddedd8fe" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
Is there any way (other than searching by window text) to do the same GetMainWindowByFile type of operation that will work with metro apps like these?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#6</link>
<pubDate>Sat, 11 Jul 2020 16:29:16 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#6</guid>
<category>DisplayFusion</category>
<description><![CDATA[A little more information:
When I look up the running official twitch app in task manager, it shows the actual program icon and TwitchUI.exe but the 3rd party zTwitch windows store/metro app does not.
The shortcut to zTwitch on the displayfusion taskbar says
the application for zTwitch
C:\Pro...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
A little more information:<br/>
<br/>
When I look up the running official twitch app in task manager, it shows the actual program icon and TwitchUI.exe but the 3rd party zTwitch windows store/metro app does not.<br/>
<br/>
The shortcut to zTwitch on the displayfusion taskbar says<br/>
<br/>
the application for zTwitch<br/>
<br/>
C:\Program Files\WindowsApps\76Chococode.Twitch.tvforWindows10_1.17763.50.0_x64__crad18n2hztbr\TwitchUWP.exe<br/>
<br/>
the Metro (Universal) App ID of zTwitch<br/>
<br/>
76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App<br/>
<br/>
When I look up zTwitch as a running app in task manager and click on it's properties, it shows folder icon with this:<br/>
<br/>
76Chococode.Twitch.tvforWindows10_1.17763.121.0_x64__crad18n2hztbr<br/>
<br/>
in the top field instead of an exe, and it says it is in C:\Program Files\Windows Apps<br/>
<br/>
The task manager actually has 2 headings under zTwitch (and other similar windows store/metro apps).  The other heading is:<br/>
<br/>
RuntimeBroker.exe<br/>
<br/>
in C:\Windows\System32<br/>
<br/>
So I am still confused as to what I should be putting into the BFS.Application.GetMainWindowByFile when using windows store/metro apps <br/>
<br/>
This below doesn't appear to be working.  Is there a command I can use to point to the correct location and focus on the running exe or the RuntimeBroker.exe + zTwitch's exe (which is C:\Program Files\WindowsApps\76Chococode.Twitch.tvforWindows10_1.17763.50.0_x64__crad18n2hztbr\TwitchUWP.exe)  ?<br/>
<br/>
//get the main window of zTwitch app by it's executable name<br/>
      IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#5</link>
<pubDate>Sat, 11 Jul 2020 15:40:07 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#5</guid>
<category>DisplayFusion</category>
<description><![CDATA[I did swap out the code to what you suggested for BFS.Application.Start of the zTwitch app and that launches it much cleaner.  Thanks!
Now I am stuck at focusing zTwitch by it's exe. As a workaround I'm searching my window title but that is slower and less reliable.. it ends up clunky.    This i...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I did swap out the code to what you suggested for BFS.Application.Start of the zTwitch app and that launches it much cleaner.  Thanks!<br/>
<br/>
Now I am stuck at focusing zTwitch by it's exe. As a workaround I'm searching my window title but that is slower and less reliable.. it ends up clunky.    This is what I'm trying to do<br/>
<br/>
 //get the main window of twitch app by it's executable name<br/>
      IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");<br/>
      <br/>
 <br/>
I got that information from the windows store / metro information when I pinned the zTwitch app to my displayfusion taskbar.  That information is here:<br/>
<br/>
the application for zTwitch<br/>
<br/>
C:\Program Files\WindowsApps\76Chococode.Twitch.tvforWindows10_1.17763.50.0_x64__crad18n2hztbr\TwitchUWP.exe<br/>
<br/>
the Metro (Universal) App ID of zTwitch<br/>
<br/>
76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App<br/>
<br/>
You helped me launch them perfectly, thankfully.  <br/>
If you can help me get the windows store/metro apps like zTwitch to be focused by their .exe instead of the more clunky search by window title method everything will be resolved perfectly.   Thanks in advance for any help.<br/>
<br/>
For reference, the default Twitch app, unlike the windows store/metro zTwitch app, works perfectly using this method:<br/>
<br/>
//get the main window of the default twitch app by it's executable name<br/>
IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUI.exe");
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#4</link>
<pubDate>Fri, 10 Jul 2020 13:44:54 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#4</guid>
<category>DisplayFusion</category>
<description><![CDATA[Thanks for the reply.
My problem is that I would like to focus on windows store apps like zTwitch and others by their .exe rather than searching by the window title's text, but windows store apps are messy in their locations and methods.
//-------How can I make a windows store app like this:
t...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thanks for the reply.<br/>
My problem is that I would like to focus on windows store apps like zTwitch and others by their .exe rather than searching by the window title's text, but windows store apps are messy in their locations and methods.<br/>
<br/>
//-------How can I make a windows store app like this:<br/>
<br/>
the application for zTwitch<br/>
<br/>
C:\Program Files\WindowsApps\76Chococode.Twitch.tvforWindows10_1.17763.50.0_x64__crad18n2hztbr\TwitchUWP.exe<br/>
<br/>
the Metro (Universal) App ID of zTwitch<br/>
<br/>
76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App<br/>
<br/>
//---- Work like a regular app such as this from the official twitch app? (twitch's app doesn't have the messy windows store app methods that zTwitch has):<br/>
<br/>
 //get the main window of the default twitch app by it's executable name<br/>
     IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUI.exe");<br/>
     <br/>
 // and this to launch the default twitch app<br/>
uint appID = BFS.Application.Start("C:\\Users\\&lt;USER NAME&gt;\\AppData\\Roaming\\Twitch\\Bin\\Electron\\TwitchUI.exe", "");<br/>
<br/>
//------------------------------------------<br/>
//------------------------------------------<br/>
<br/>
// -- I'm only using the window title by text method since I can't get zTwitch code to work by exe like the official twitch app does.. the text method is inferior to the by exe method so I'd really like to get this to work correctly.  I did try it like this below using *TwitchUWP.exe but it didn't work:<br/>
<br/>
//get the main window of zTwitch app by it's executable name<br/>
IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");<br/>
<br/>
// ---  I also tried to launch the zTwitch windows store app by this method which doesn't work:<br/>
<br/>
// Launch the zTwitch windows store app<br/>
uint appID = BFS.Application.Start("C:\\Windows\\explorer.exe shell:appsFolder\\76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App", "");<br/>
<br/>
// So I instead had to point the Application.Start to a command/explorer shortcut I made, which isn't preferable and is probably slower:<br/>
<br/>
 // Launch the ZTwitch windows store app from a customized shortcut .lnk<br/>
          uint appID = BFS.Application.Start("C:\\Users\\&lt;UserName&gt;\\Desktop\\&lt;a few subfolders&gt;\\Open-zTwitch.lnk", "");<br/>
        <br/>
<br/>
// ---  where the start by exe method does work on the official twitch app below since it doesn't have the messy windows store locations/methods:<br/>
<br/>
// Launch the official twitch application<br/>
uint appID = BFS.Application.Start("C:\\Users\\&lt;USER NAME&gt;\\AppData\\Roaming\\Twitch\\Bin\\Electron\\TwitchUI.exe", "");
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#3</link>
<pubDate>Fri, 10 Jul 2020 01:28:16 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#3</guid>
<category>DisplayFusion</category>
<description><![CDATA[You're close, but the parameters need to be in the second part of the overload, like this:
Code
Copy
Select All
// Launch the application (customize the path to match your application)
uint appID = BFS.Application.Start("C:\\Windows\\explorer.exe", "shell:appsFolder\\76Chococode.Twitch.tvfor...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You're close, but the parameters need to be in the second part of the overload, like this:<br/>
<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e6f69eab971418a9fc265c6ca4d15" class="ClipboardCopyControl"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e6f69eab971418a9fc265c6ca4d15Js'); return false;"><img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e6f69eab971418a9fc265c6ca4d15Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">// Launch the application (customize the path to match your application)
uint appID = BFS.Application.Start("C:\\Windows\\explorer.exe", "shell:appsFolder\\76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App");</pre><textarea id="code019e6f69eab971418a9fc265c6ca4d15" name="code019e6f69eab971418a9fc265c6ca4d15" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
<br/>
As for focusing the window, if there are multiple zTwitch windows open, the only way to uniquely identify them would be if they have something different in their window title.<br/>
<br/>
I noticed that your "focus the window" code is only getting the window handle. I'm assuming you're then passing <div class="Inline"><pre>BFS.Window.Focus(mainWindow)</pre></div>?
</div>
]]></content:encoded>
</item>
<item>
<title>RE: Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#2</link>
<pubDate>Thu, 09 Jul 2020 16:30:14 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2#2</guid>
<category>DisplayFusion</category>
<description><![CDATA[I pointed it to the shortcut and it seems to be working to launch that way but if anyone knows how to get it to launch from code more like the shortcut's own text please let me know.
I also can't get it to reliably focus on zTwitch for other operations once zTwitch is open when I am using the me...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I pointed it to the shortcut and it seems to be working to launch that way but if anyone knows how to get it to launch from code more like the shortcut's own text please let me know.<br/>
<br/>
I also can't get it to reliably focus on zTwitch for other operations once zTwitch is open when I am using the method that focuses on the .exe.<br/>
Only the window title search method works but that can get messy if there is more than one window that says zTwitch in the title (like when I just had the properties of my ZTwitch named shortcut open), and the "by title" method is slower and more clunky.  The exe method could be malfunctioning because of the other part of the script not resolving properly from the improper metro/exe path though, since it works fine with the official twitch app exe. <br/>
<br/>
For the working official twitch app version of the script,  I have the script focus the app or if it's not open it will launch the app and place it at a set x/y position.  If it's minimized it will restore it to the set position, otherwise it will minimize it when the script is activated.  So it is a miniminze/restore to set location toggle + app launch function.<br/>
<br/>
For reference, this is the application for ZTwitch:<br/>
<br/>
C:\Program Files\WindowsApps\76Chococode.Twitch.tvforWindows10_1.17763.50.0_x64__crad18n2hztbr\TwitchUWP.exe<br/>
<br/>
This is the Metro (Universal) App ID:<br/>
<br/>
76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App
</div>
]]></content:encoded>
</item>
<item>
<title>Application.Start Windows Store App Help</title>
<link>https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2</link>
<pubDate>Thu, 09 Jul 2020 16:05:10 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.displayfusion.com/Discussions/View/applicationstart-windows-store-app-help/?ID=3170c9b5-6bc4-401e-b4c1-9dc148ddefb2</guid>
<category>DisplayFusion</category>
<description><![CDATA[I'm a novice at displayfusion scripting but I've cobbled together some scripts from various other scripts.  My question is how can I get this tricky windows store app "zTwtich" to launch?   I know enough to get it working from a desktop shortcut via explorer.exe like this:
//   windows command s...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
I'm a novice at displayfusion scripting but I've cobbled together some scripts from various other scripts.  My question is how can I get this tricky windows store app "zTwtich" to launch?   I know enough to get it working from a desktop shortcut via explorer.exe like this:<br/>
<br/>
//   windows command shortcut below:<br/>
//<br/>
//   Start in:    C:\Windows\<br/>
//<br/>
//   Target:<br/>
//   C:\Windows\explorer.exe shell:appsFolder\76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App<br/>
<br/>
I can focus the app if it is already open via either of these methods<br/>
<br/>
 //get the main window of ZTwitch app by it's executable name<br/>
     IntPtr mainWindow = BFS.Application.GetMainWindowByFile("*TwitchUWP.exe");<br/>
     <br/>
     //or I instead commented that out and used the window title to focus ZTwtich if it's already open, which seemed more reliable:<br/>
<br/>
   string windowTitle = "zT";<br/>
        <br/>
// Focus the window<br/>
   IntPtr mainWindow = BFS.Window.GetWindowByText("*" + windowTitle + "*");     <br/>
     <br/>
     <br/>
     But when I try to set it to launch with modified sample code I found, inputting the shell/explorer.exe shortcut info like this it won't work:<br/>
     <br/>
// Launch the application (customize the path to match your application)<br/>
   uint appID = BFS.Application.Start("C:\\Windows\\explorer.exe shell:appsFolder\\76Chococode.Twitch.tvforWindows10_crad18n2hztbr!App", "");<br/>
<br/>
Unlike ZTwtich, the official twitch app itself works fine using this code to launch it:<br/>
<br/>
// Launch the application (customize the path to match your application)<br/>
   uint appID = BFS.Application.Start("C:\\Users\\&lt;USER NAME&gt;\\AppData\\Roaming\\Twitch\\Bin\\Electron\\TwitchUI.exe", "");<br/>
   <br/>
   <br/>
   I'd really like to figure this out so that going forward I will be able to focus and operate on, and especially LAUNCH windows store apps that are tricky like ZTwitch.    Thanks in advance for any help with this issue.<br/>
   <br/>
Edit - This site is helpful if a little obtuse about how and where the windows store apps are located but is focused on making them into a desktop shortcut not launching from displayfusion code:<br/>
<a href="https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_store/starting-windows-10-store-app-from-the-command/836354c5-b5af-4d6c-b414-80e40ed14675?rtAction=1594306673770&page=1" target="_blank" rel="nofollow"><b>https://answers.microsoft.com/en-us/windows/forum/windows_10-windows_store/starting-windows-10-store-app-from-the-command/836354c5-b5af-4d6c-b414-80e40ed14675?rtAction=1594306673770&page=1</b></a><br/>
<br/>
I realize I can also just open the displayfusion taskbar shortcuts and click on the pinned default zTwitch shortcut to find the application and metro ID's which is very handy, or would be if I can find out how to utilize the information better.  <img src="https://www.displayfusion.com/MediaCommon/SVGs/FontAwesome/face-meh.light.svg" alt=":|" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":|" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
</channel>
</rss>