I searched and I searched but no can find!
I want to have all my new scripts open in scite w/AHK with these parameters:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force ; this prevents the script from popping up the dialogue box warning if you start the program without shutting it down.
#MaxMem
DetectHiddenWindows, On ; unnecessary but left just in case of future changes.
I searched for hours to find how to add these to Sciteuser.properties which I believe is where to add the above. I looked at scite site,Googled and AHK Help but darned if I can find it. I am stumped and this is first time on forum.
Please help I would immensely appreciate it!
[Mod action: Moved topic from “Ask for Help (v2)”.]
New scripts in scite/AHK with added settings Topic is solved
Re: New scripts in scite/AHK with added settings
I just tried this and it seems to work: viewtopic.php?p=480175#p480175
Re: New scripts in scite/AHK with added settings
Hi
Question is there not a way to edit the current default template for a new script in scite/AHK ,if so where is that located ???
Thanks
Question is there not a way to edit the current default template for a new script in scite/AHK ,if so where is that located ???
Thanks
Re: New scripts in scite/AHK with added settings
Look in C:\Windows\ShellNew\Template.ahk
Re: New scripts in scite/AHK with added settings
Hi
Thanks ,I edited that template before this question and it still comes up blank-untitled with SCite4AHK but the scriplet utility works, for pasting in to the blank script. I'll go with that for now! I'm just trying to get my bearings straight navigating through the folders and figuring out the whole scheme of things. I do appreciate your help, always!
Thanks so much!!
Joe
Thanks ,I edited that template before this question and it still comes up blank-untitled with SCite4AHK but the scriplet utility works, for pasting in to the blank script. I'll go with that for now! I'm just trying to get my bearings straight navigating through the folders and figuring out the whole scheme of things. I do appreciate your help, always!
Thanks so much!!
Joe
Re: New scripts in scite/AHK with added settings Topic is solved
I was able to get it to work in SciTE4AutoHotkey. For what it's worth, my files are in the following locations.
- C:\Users\MYUSERNAME\Documents\AutoHotkey\SciTE\NewAhk.lua
Code: Select all
-- https://www.autohotkey.com/board/topic/54431-scite4autohotkey-v3004-updated-aug-14-2013/page-62#entry568765 if props["FileNameExt"] == "" and editor.Length == 0 and not buffer.templateLoaded then f = io.open(os.getenv("windir").."\\ShellNew\\Template.ahk", "r") if f then t = f:read("*all") if t:sub(1, 3) == "\239\187\191" then -- UTF-8 BOM t = t:sub(4) scite.MenuCommand(IDM_ENCODING_UTF8) end editor:append(t) editor:EmptyUndoBuffer() editor:SetSavePoint() f:close() end buffer.templateLoaded = true end
- C:\Users\MYUSERNAME\Documents\AutoHotkey\SciTE\SciTEUser.properties
Code: Select all
extension.*.ahk=$(SciteUserHome)\NewAhk.lua
- C:\Windows\ShellNew\Template.ahk
Code: Select all
; AHK script template ...
Last edited by Datapoint on 30 Dec 2023, 07:10, edited 1 time in total.
Re: New scripts in scite/AHK with added settings
BINGO!!!
That did it! I'm not sure why I couldn't grasp it from your previous link?? Brain freeze or old age possibly .
I created the NewAhk.lua, copied the info in to that and added the SciTEUser.properties info in "docs\AHK\scite" and viola .
I spent pretty much since Christmas afternoon till now , just couldn't seem to decipher all I searched and your very helpful instruction
but when I saw your last post it clicked. So I had no link basically to C:\Windows\ShellNew\Template.ahk now I can edit that.
THANK YOU SO SO MUCH!!!
Joe
That did it! I'm not sure why I couldn't grasp it from your previous link?? Brain freeze or old age possibly .
I created the NewAhk.lua, copied the info in to that and added the SciTEUser.properties info in "docs\AHK\scite" and viola .
I spent pretty much since Christmas afternoon till now , just couldn't seem to decipher all I searched and your very helpful instruction
but when I saw your last post it clicked. So I had no link basically to C:\Windows\ShellNew\Template.ahk now I can edit that.
THANK YOU SO SO MUCH!!!
Joe
Who is online
Users browsing this forum: No registered users and 18 guests