I have had this happen before with a single QVW. (If it's happening with all your qvws, I'd go with Michael's suggestion of reinstalling).
If it's just one file, you'll have to rebuild the file using a backup. Or you can try to extract the script with this macro:
Set objTextFile = openOutputFile("C:\myscript.qvs")
Rem *** Create and open an output file
CONST ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set openOutputFile = objFSO.OpenTextFile (filename, ForWriting, True)
Code it in your module and run it with Test. You'll have to grant System Access. That will extract your script to a file. Then run another macro like:
set docprop = ActiveDocument.GetProperties
docprop.Script = "empty"
Then if you can edit the script, you can copy/paste from the file -- after looking it over for weirdness.
I tried below macro code for adding new script line into existed tab "Main 2" ,
but the below code working like creating another new tab "Main 2" and adding the script line as $(Include=d:\vqd eat\text\test.txt);
what to change in below code for to work like add new script line in existed tab "Main 2" ?
docprop.Script = docprop.Script & chr(13) & chr(10) & "///$tab Main 2" & chr(13) & chr(10) & "$(Include=d:\vqd eat\text\test.txt);"
Thanks in advance
I'm thinking that the coordinates for the script window might have become messed up somehow so that the window is actually opening outside the visible computer screen and taking focus from QV so that it appears to have hung.
After clicking Edit Script, hold down Alt, push Space once and hit M (as in move). Then let go of all keys and use the arrow keys to try and move the script window into the screen area. Hope this works.
I have had this happen if I use QlikView with a second monitor and extend the desktop to that monitor. If I move the editor screen to the second monitor, then later open QlikView without the second monitor the Editor still opens where it was with the second monitor. I do notice that I can see the edge of the editor window at the edge of my screen, and my mouse pointer turns into an arrow so I can drag the editor edge into view.
I wonder, can we class this as a bug?
I had forgotten the Alt-M trick though - good call.
Not sure on the app to reset the window pos. I did however track down the registry value for this so that one can check it manually:
DlgPos334 - Script Editor
TopLeftX, TopLeftY, BottomRightX, BottomRightY, Maximized (1/0)
Michael Solomovich wrote:Especaily that the DlgPos334 is for the script editor.
Can we get the macro editor?
If you're up for it, an easy way to determine the various registry keys is to use a monitoring tool like Procmon or Regmon from Sysinternals -- free tools now distributed by Microsoft at http://technet.microsoft.com/en-us/sysinternals/bb545027.aspx
Technically, Regmon is for older versions of Windows but it works fine on my XP. Regmon has filters so you can monitor just want you want like "HKCU\SOFTWARE\QlikTech\QlikView\WindowPos\*". Procmon has filters also, a little more complex to setup because it monitors more than RegKeys.
Using Regmon, I can see that the WindowPos keys are:
DlgPos334 - Script Editor V9
DlgPos332 - Script Editor V8.5
DlgPos257 - Macro Editor V9
DlgPos254 - Macro Edito V8.5
Thought it was interesting that they differ between releases.
Here, I knew I had it... It is QlikTech's file. No any documenmtaion or description though.
RemoveWindowPos.zip 103.1 K