Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/15/2024 in all areas

  1. Ty @rsn for nudging me in correct direction https://newbedev.com/can-t-change-tel-protocol-handler-in-windows-10 did it Edit: something like this writeReg("HKEY_CURRENT_USER\SOFTWARE\Classes\callto", "", "URL:callto") writeReg("HKEY_CURRENT_USER\SOFTWARE\Classes\callto", "URL Protocol", "") writeReg("HKEY_CURRENT_USER\SOFTWARE\Classes\tel", "", "URL:tel") writeReg("HKEY_CURRENT_USER\SOFTWARE\Classes\tel", "URL Protocol", "") writeReg("HKEY_CURRENT_USER\SOFTWARE\Classes\dialer.callto\Shell\Open\Command", "", '"' & @ScriptDir & '\' & $appName & '.exe" "%1" /phone') writeReg("HKEY_CURRENT_USER\SOFTWARE\Dialer\Capabilities", "ApplicationDescription", "Dialer") writeReg("HKEY_CURRENT_USER\SOFTWARE\Dialer\Capabilities", "ApplicationName", "Dialer") writeReg("HKEY_CURRENT_USER\SOFTWARE\Dialer\Capabilities\URLAssociations", "callto", "dialer.callto") writeReg("HKEY_CURRENT_USER\SOFTWARE\Dialer\Capabilities\URLAssociations", "tel", "dialer.callto") writeReg("HKEY_CURRENT_USER\SOFTWARE\RegisteredApplications", "Dialer", "Software\Dialer\Capabilities") Func writeReg($p, $n, $v) If @error Or RegRead($p, $n) <> $v Then RegWrite($p, $n, "REG_SZ", $v) EndFunc ;==>writeReg
    2 points
  2. Jos

    SciTE and my script version

    What about this version: -- Perform before each save function PersonalTools:OnBeforeSave(path) local VersionPrefix = ";Version:" -- define the prefix for version line. needs to be the first string on a line if editor.Lexer == SCLEX_AU3 and path ~= "" then -- find version prefix in sourcecode local spos, epos = editor:findtext('^\\s*' .. VersionPrefix .. '\\s*[\\d\\.]*', SCFIND_REGEXP, 0) -- Update when found if spos then local dline = editor:textrange(spos, epos) -- get the text found local curversion = dline:match(VersionPrefix .. '%s*([%d%.]*)') -- retrive portion containing the number local orgpos = editor.CurrentPos -- save current pos local firstvisible = editor.FirstVisibleLine -- save first visible line of script olen = epos - spos -- calculate length of found version string local newversion = VersionPrefix .. string.format(" %.3f", curversion + 0.001) nlen = newversion:len() -- calculate length of new version string editor:SetSel(spos, epos) -- Set text to replace editor:ReplaceSel(newversion) -- replace old version string with new if epos <= editor.CurrentPos then editor:GotoPos(orgpos) -- set caret back to saved pos when we were before the xhanged text else editor:GotoPos(orgpos + nlen - olen) -- set caret back to saved pos when we were after the changed text end editor.FirstVisibleLine = firstvisible -- reset first visible line of script end end end
    2 points
  3. https://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/Lua/SciTE%20Pane%20API.htm My first .lua commands -- Update version of line with this format: -- ;Version: 1.001 -- on each save function PersonalTools:OnBeforeSave(path) if editor.Lexer == SCLEX_AU3 and path ~= "" then local spos, epos = editor:findtext('^\\s*;Version:\\s*[\\d\\.]*', SCFIND_REGEXP, 0) if spos then local dline = editor:textrange(spos, epos) local curversion = dline:match('Version:%s*([%d%.]*)') local cpos = editor.CurrentPos -- Sets the position of the caret. newversion = curversion + 0.001 editor:SetSel(spos, epos) editor:ReplaceSel(";Version: " .. string.format("%.3f", newversion)) editor:GotoPos(cpos) -- Set caret to a position and ensure it is visible. end end end
    2 points
  4. YES! This works perfect now! So detailed example, again thank you so much! FirstVisibleLine is the code I needed.
    1 point
  5. Oh well, another one liner then (less abstruse ) : $t = Mod(StringRegExp($s, "(\d{1,2})", 1)[0], 12) + (StringRegExp($s, "(?i).*([AP]M)", 1)[0] = "AM" ? 0 : 12) & StringRegExp($s, "(:\d{1,2})", 1)[0]
    1 point
  6. 4-15-2024 Been a while with progress unreported! Unfortunately, this RPGenerator hiatus will continue until fall 2024 as progress is being made on the background with RPGenerator. I've severely pumped the brakes on the project and have returned to the drawing board on many aspects of RPGenerator, including, foremost, the graphics as well as the over all code used. The autoit concept demo that's currently available here is being discontinued due to many reasons that have led to this decision, based on various difficulties or my own dissatisfaction/frustrations with aspects of the project and where it stands. What's in the plans? Right now I'm developing a scriptable and modular IRC core software with Python, with this core software I plan to make the RPGenerator hub IRC bot (as mentioned previously, this part is still happening, but instead will be developed purely in python.) Autoit comes in with client programs for windows users which will be a user side chat client that features some completely redesigned graphics and is built to connect and interact with game hubs being hosted by the python bot. As far as the autoit side of this project is concerned, it has been scrapped and slated for a complete start over. Official production continuation of RPGenerator is TBD/TBA. I'm also migrating stuff and remodeling my 'brand' thru GitHub and Patreon, which will include software, other digital products/media, and maybe one day merch. Who knows. Do not worry, RPGenerator will be back and better than ever! Mode60 Official Website (m0de-60.github.io)
    0 points
×
×
  • Create New...