Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Edit Script Function

Using QV 8.5 latest build. Had no problems till today. Every time I hit the Edit Script button the program freezes and I have to use CTRL-ALT-DEL to end program.

QV will reload, run macros and all files and sheets are working just I can't edit script. The system does not show not responding or an error at all.

Thanks for any help provided.

Tags (1)
1 Solution

Accepted Solutions
jsn
Honored Contributor

Edit Script Function

Hmm..

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.

15 Replies
mov
Esteemed Contributor III

Edit Script Function

Does it happen with a specific qvw file or with any file? I'd recommend to uninstall and reinstall QlikView.

MVP & Luminary
MVP & Luminary

Edit Script Function

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:

Sub extractScript
Set objTextFile = openOutputFile("C:\myscript.qvs")
objTextFile.WriteLine(ActiveDocument.GetProperties.Script)
objTextFile.Close()
End Sub

Function openOutputFile(filename)
Rem *** Create and open an output file
CONST ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set openOutputFile = objFSO.OpenTextFile (filename, ForWriting, True)
End Function

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:

Sub fix
set docprop = ActiveDocument.GetProperties
docprop.Script = "empty"
ActiveDocument.SetProperties docprop
End Sub

Then if you can edit the script, you can copy/paste from the file -- after looking it over for weirdness.

-Rob

jsn
Honored Contributor

Edit Script Function

If it's a specific document I've seen this happen where global variables have been defined in the Macro module. Try commenting out everything in the macro module which is not enclosed within Subs or Functions and see if that lets you access the script.

Not applicable

Edit Script Function

Unfortunly its EVERY document including starting a new file and the samples.

jsn
Honored Contributor

Edit Script Function

Hmm..

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.

mov
Esteemed Contributor III

Edit Script Function

jsn,
This is exactly what I was thinking about. And, occasionally it happens to the "edit macro" window as well. I think that QlikTech has a utility to restore the position of the edit script window, hasn't it?

Not applicable

Edit Script Function

It worked. Thanks jsn and to all who suggested answers and help it was greatly appreciated.

Not applicable

Edit Script Function

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.

jsn
Honored Contributor

Edit Script Function

Michael,

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:

Computer\HKEY_CURRENT_USER\Software\QlikTech\QlikView\WindowPos

DlgPos334 - Script Editor

For example:

193,132,960,641,0

TopLeftX, TopLeftY, BottomRightX, BottomRightY, Maximized (1/0)