Page 1 of 1

Cannot edit files in primal script

Posted: Wed Aug 16, 2017 6:17 am
by huginson
PrimalScript Version 7.3.103
64X Version
Windows 10 X64

When i open a script a.g.a d:\wamp64\www\index.php. Primalscript will not let me edit in the scripts.(like keyboard is locked, but i can move cursor around)

The status bar is saying [Ready Ascii BLOCK]. I suspected it might have been files comming from another Source and that the file had to be unblocked.
At first 3 files was blocked and i removed the Block from all of them. However....PrimalScript is still treating the files as blocked. Does it have some kind of cache on Block?, No other program is treating these files as blocked. Any way to turn of that feature in PrimalScript ?

Re: Cannot edit files in primal script

Posted: Wed Aug 16, 2017 6:25 am
by huginson
Well i found a workaround even if it is annoying. Open in Primalscript. Save it, Close file and reopen. Then the Block is gone on the status bar.

Re: Cannot edit files in primal script

Posted: Wed Aug 16, 2017 7:37 am
by Alexander Riedel
Blocking files that come from the internet or another computer is not a PrimalScript feature, it is a Windows feature. Windows does not allow editing (saving that is) or executing files that have come from an outside source. PrimalScript, PrimalPad and PowerShell Studio alert you to the existence of such a lock via the status bar and by treating the file as if it was read-only, which it effectively is. We also do not allow execution of such script files as a security measure.
If you remove the lock attribute outside the application you do need to reload the file, that is correct.
The easier way however is to unblock the file within PrimalScript:
Right click on the file tab and click on the "Blocked" menu topic with the check mark.
unblock.png
unblock.png (89.53 KiB) Viewed 4894 times
PowerShell Studio has a similar context menu item. The block/unblock feature for PrimalPad is located on the ribbon interface.

Re: Cannot edit files in primal script

Posted: Thu Aug 17, 2017 9:17 pm
by huginson
Thank you Alexander.

I know about the Windows "feature" of blocking files, however PrimalScript kept saying it was blocked even after i removed the block in windows. It did not help to reload the file (my reload method was to close the file and reopen, i did not know about the reload feature in PrimalScript then), i had to save it in Primalscript first.

Thank you so much for the tip about unblocking files in PrimalScript, i did honestly not know you could right click on the tabs, and wow theres all that stuff i been looking for lol. Unblocking there worked like a charm :-)

After downloading my work to my home computer this time i ran "gci d:\(mypath) -recurse | unblock-file" in powershell to unblock all files before starting to work.

Again thank you