<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBScript: AppActivate / Restore Window not working in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113055#M633821</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you show a screenshot of what kind of object you want to minimize ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If trying to restore objects when navigating from one sheet to other.....This would make all minimized object to maximize in active sheet object, if any...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub maxi&lt;/P&gt;&lt;P&gt;set s = ActiveDocument.ActiveSheet.SheetObjects(0).GetSheet&lt;/P&gt;&lt;P&gt;for i=0 to s.NoOfSheetObjects-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.SheetObjects(i).restore&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jul 2016 21:03:19 GMT</pubDate>
    <dc:creator>vikramv</dc:creator>
    <dc:date>2016-07-07T21:03:19Z</dc:date>
    <item>
      <title>VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113050#M633813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to restore a window that has been minimised but I can't get the VBScript working?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14679126064676401" jivemacro_uid="_14679126064676401" modifiedtitle="true"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;sub restore&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Set WshShell = WScript.CreateObject("WScript.Shell")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;WshShell.AppActivate "Untitled - Notepad"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;success = WshShell.appactivate("Untitled - Notepad")&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;if success then WshShell.sendkeys "% r"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;end sub&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Any ideas, to where I've gone wrong?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 17:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113050#M633813</guid>
      <dc:creator />
      <dc:date>2016-07-07T17:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113051#M633814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jammy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14679148434777570" jivemacro_uid="_14679148434777570" modifiedtitle="true"&gt;
&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;Sub restore &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Set WshShell = CreateObject("WScript.Shell")&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;WshShell.AppActivate "Untitled - Notepad"&amp;nbsp; &lt;/P&gt;
&lt;P&gt;success = WshShell.appactivate("Untitled - Notepad")&amp;nbsp; &lt;/P&gt;
&lt;P&gt;if success then WshShell.sendkeys "% r" &lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 18:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113051#M633814</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-07-07T18:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113052#M633816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tried but unfortunately it still doesn't restore the minimised program? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:04:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113052#M633816</guid>
      <dc:creator />
      <dc:date>2016-07-07T20:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113053#M633817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;rem **Can you try this**&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;set c=ActiveDocument.GetSheetObject("YourObjectID")&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;if c.IsMaximized then&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.Restore&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;else&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; c.Maximize&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;end if&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:20:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113053#M633817</guid>
      <dc:creator>vikramv</dc:creator>
      <dc:date>2016-07-07T20:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113054#M633819</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This didn't work either&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 20:33:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113054#M633819</guid>
      <dc:creator />
      <dc:date>2016-07-07T20:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113055#M633821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you show a screenshot of what kind of object you want to minimize ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If trying to restore objects when navigating from one sheet to other.....This would make all minimized object to maximize in active sheet object, if any...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub maxi&lt;/P&gt;&lt;P&gt;set s = ActiveDocument.ActiveSheet.SheetObjects(0).GetSheet&lt;/P&gt;&lt;P&gt;for i=0 to s.NoOfSheetObjects-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; s.SheetObjects(i).restore&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jul 2016 21:03:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113055#M633821</guid>
      <dc:creator>vikramv</dc:creator>
      <dc:date>2016-07-07T21:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113056#M633823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;After a macro is run, for some reason Qlikview gets confused &amp;amp; brings the last active window to the front.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;For example... I open a QV file from explorer -&amp;gt; run the macro in QV -&amp;gt; explorer is brought to the font.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;If explorer is minimised, this doesn't happen.&amp;nbsp; So I need a script which restores QV to the front.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I have this working:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14679827137293085" jivemacro_uid="_14679827137293085" modifiedtitle="true"&gt;
&lt;P&gt;Sub open&lt;/P&gt;
&lt;P&gt;dim objSHL&lt;/P&gt;
&lt;P&gt;set objSHL = createobject("wscript.shell")&lt;/P&gt;
&lt;P&gt;objSHL.AppActivate "Notepad"&lt;/P&gt;
&lt;P&gt;objSHL.sendkeys "(% )(R)"&lt;/P&gt;
&lt;P&gt;End Sub&lt;/P&gt;
&lt;/PRE&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;So this will restore Notepad to the front.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;But now the next question..... how to restore the current QV project to the front?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I've substituted "Notepad" with... "QliKView", "QlikView x64........ " all combinations but it doesn't restore QV to the front!?&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Any more ideas, as it's driving me crazy?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 12:58:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113056#M633823</guid>
      <dc:creator />
      <dc:date>2016-07-08T12:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: VBScript: AppActivate / Restore Window not working</title>
      <link>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113057#M633825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my experience it should be last way to solve a task with activating/restoring windows and sending shortcuts per any script - it won't never run really stable. Therefore what is your real aim? Maybe there are other ways to get your wanted results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 13:35:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/VBScript-AppActivate-Restore-Window-not-working/m-p/1113057#M633825</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-07-08T13:35:18Z</dc:date>
    </item>
  </channel>
</rss>

