Cannot edit files in primal script

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
huginson
Posts: 5
Last visit: Wed Dec 20, 2023 7:13 pm

Cannot edit files in primal script

Post 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 ?
User avatar
huginson
Posts: 5
Last visit: Wed Dec 20, 2023 7:13 pm

Re: Cannot edit files in primal script

Post 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.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Cannot edit files in primal script

Post 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 6138 times
PowerShell Studio has a similar context menu item. The block/unblock feature for PrimalPad is located on the ribbon interface.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
huginson
Posts: 5
Last visit: Wed Dec 20, 2023 7:13 pm

Re: Cannot edit files in primal script

Post 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
This topic is 6 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.