% % % /* ***addedefs,t monitfix xactfold allseter helplopn helpabov helpsame jsphfspc jsphfspd xmlzwebr xhelstar xhelseek xhelback enteronm enterova enterall enteroff xhelperx panelflt panelufl attrplus helpform helparea ownershp taskquet taskrtrn taskstay tasksave taskserv backhome timetrak makeroot fieldset accepted invector xmlderor xmlerror ????delv ????srvr ????supv slidrprd gotask */ "definer" "Load Definitions If Not Already Loaded" "Exec" % "-->" ' _* ^"def_" dup _ isnull) { true exch ! true } { pop false } ifelse ' newdef "untelldate" "Convert from Date to Tell Milliseconds" "Exec" % "date-time --> tell-msec" ' js$ 62135578800000 add 3600000 add ' newdef "telldate" "Convert from Tell Milliseconds to Formatted Date" "Exec" % "tell-msec --> date-time-formatted" '62135578800000 sub 3600000 sub fromjs$ &" GMT" dup Time.DateOf &" " exch Time.TimeForm &' newdef "countup?" "For Loop Only If Terminus Greater Than or Equal to Initial" "Exec" % "count --> initial step terminus allow" "countup third second le" newdef "digits" "Slice Leading Digits and Trailing String" "Exec" % "str --> digs right-of" " empty exch length countup { pop dup 1 left numeric { exch second 1 left & exch -1 left false } { true } ifelse ? } for % % stack: digs right-of % " newdef "dtfull" "Full DateTime Parts" "Exec" % "dtime --> dow-verbose month-verbose dom-super year time-ampm" ` "f" Time.Time$ "," 0 3 1 parse exch trim " " slice dup < |1 &"st" |2 &"nd" |3 &"rd" |21 &"st" |22 &"nd" |23 &"rd" |31 &"st" > not { &"th" } if rot trim " " slice ` newdef "cap1st" "Capitalize First Letters" "Exec" % "str --> 1st-lets-cap" ` % % adjust first letters to be capitalized % trim " " " " replall " " " " replall " " " " replall " " " " replall empty exch { " " slice exch isnull ? dup 1 left upper exch -1 left & &" " ^3) exch } loop pop2 trim ` newdef "commas" "Replace All Commas" "Exec" % "builder repl-comma --> adj-builder" ' "," replall ' newdef "comma!" "Add Comma Seped Entry to Build" "Exec" % "item -->" ' % appends to var build _comma { ^" ," } if true !comma catcr ^:builder ' newdef "toklist" "Build Comma Seped List of Tokens" "Exec" % "str -->" ' % appends to var build false !comma "|" right$ { "|" slice exch trim isnull ? % stack: remaining token-body-line execstr % stack: remaining ordinal token-name pop2nd quoter comma! } loop pop2 ' newdef "isletter" "Is Letter" "Exec" % "char --> is-letter" "lower asc dup 0x61 ge exch 0x7A le and" newdef "toletter" "Number to Letter Uppercase" "Exec" % "ordinal --> cap-letter" "1 max 26 min letter" newdef "capord" "Capital Letter to Ordinal Normalized" "Exec" % "letter --> ordinal" "upper asc 0x40 sub 1 max 26 min" newdef "divmod" "Multiples and Remainder" "Exec" % "num div --> multiples remainder" "2 copy div normint tuck mod" newdef "isupper" "Is Upper Case Letter" "Exec" % "char --> is-uppercase" "asc dup 0x41 ge exch 0x5A le and" newdef "charat" "Get Character at Position in String" "Exec" % "str pos --> char" "1 mid" newdef "charat(" "Get Character at Position in String Preserved" "Exec" % "str pos --> str char" "seq221 1 mid" newdef "quocsv" "Surround Single Lines Csv Fields Comma Separated with Double Quotes" "Exec" % "csv-raw --> adj-csv" ` "," '","' replall ^'"' &'",' ` newdef "upper?" "Is Character in Upper Case Range" "Exec" % "char --> upper-case" "asc 0x60 lt" newdef "step!" "Set Tick and Gearing to Force Next Step" "Exec" % "tick-id-->" "dup !tick !Gearing" newdef "axuact" "Action Unit Process in Locker Code" "Exec" % "--> action-type" "_Arching.ServLock 1 right upper" newdef "axumoff" "Message Bypass Action Set in Locker Code" "Exec" % "--> action-type" '_Arching.ServLock -2 left 1 left "9" eq$' newdef "axutype" "Type of Action Unit in Locker Code" "Exec" % "--> action-type" "_Arching.ServLock 1 left upper" newdef "numprods" "Number of Products in Locker Code" "Exec" % "--> num-prods" "_Arching.ServLock -2 left 1 left" newdef "twilnum" "Twilio Channel Number in Locker Code" "Exec" % "--> twilio-chan-number" "_Arching.ServLock -3 left 1 left" newdef "twilchan" "Twilio Channel Letter from Number in Locker Code" "Exec" % "--> twilio-chan-letter" "twilnum letter" newdef "nextext" "Append Text Wildcard and Get Next File" "Exec" % "-->" "textwild nextfile" newdef "prevtext" "Append Text Wildcard and Get Previous File" "Exec" % "-->" "textwild prevfile" newdef "estnow" "Get Time and Date Now EST Values" "Exec" % "-->" 'Time.Now dup !Msg.date "Eastern Standard Time" Time.ToUtc base$ !Msg.msec' newdef /* "" "" "Exec" % "-->" "" newdef */ "Pho.!" "Instruct Phocus Admin of Photoshop" "Exec" % "js -->" ' _Arching.Phocus { asc2hex quoter ^"Phocus(" jspend Base.! } { @Phocus Url.! } ifelse ' newdef "emptyx" "Exchange Empty String with Top Item" "Exec" % "item --> empty item" "empty exch" newdef "notpop" "If Not Found Pop One Item" "Exec" % "[ item ] logic -->" "not { pop } if" newdef "notpop2" "If Not Found Pop Two Items" "Exec" % "[ item item ] logic -->" "not { pop2 } if" newdef "sliceposx" "Slice the String After Ordinal Position Left Right" "Exec" % "str char-pos --> right-part left-part" "2 copy minus left tuck left" newdef "slicepos" "Slice the String After Ordinal Position Right Left" "Exec" % "str char-pos --> left-part right-part" "sliceposx exch" newdef "slicex" "Slice String with Token Yield Right Left" "Exec" % "str token --> right-part left-part" "slice exch" newdef "param$" "Isolate Named Parameter" "Exec" % "str token --> parameter" 'right$ "|" left$' newdef "escquo" "Escape String and Quote" "Exec" % "str --> esc-quo-string" "escape quoter" newdef "svalx" "String Value Convert to Hex and Append" "Exec" % "builder valname --> adj-build" 'dup _ asc2hex quotesep " hex2asc !" catpref catcatcr' newdef "look&dup" "Build String Use Item as Quoted Then Duplicate as Looker" "Exec" % "build look-item --> build" 'dup quo&cr &"|" ^ &" " &' newdef "quo&cr" "Double Quote and Append CrLf" "Exec" % "item --> quoted-and-cr" 'quoter &;' newdef "look&" "Build String Use Item as Quoted" "Exec" % "build look-item --> build" 'quo&cr &' newdef "folder(" "Formalize and Create Folder Duped" "Exec" % "path-informal --> path-formal path-formal" ' folder dup ' newdef "copyfile(" "Copy File Preserving Destination" "Exec" % "src dest --> dest" 'to3rd copyfile' newdef "perscreen" "Calculate Region as Percentages of App Screen" "Exec" % "app-per-x app-per-y app-per-w app-per-h --> app-pix-x app-pix-y app-pix-w app-pix-h" "_App.Width pull5th mul int _App.Height pull5th mul int _App.Width pull5th mul int _App.Height pull5th mul int *monitfix " newdef "(@@" "Push Current Task" "Exec" % "--> task@" "@@ (@" newdef "Form.Focus" "Give Focus to Form" "Exec" % "-->" "Mep._Hwnd Win.Focus" newdef "ofsrc" "Prefix Path of Wwwroot Source" "Exec" % "file-name --> file-spec" '"wwwroot\" ofapp ^' newdef "logic$" "Convert Logic Value to String" "Exec" % "logic --> logic-str" '{ "true" } { "false" } ifelse' newdef "atleft?" "Pass String Through If Matches At Left" "Exec" % "str left-str --> [ str ] matches-left" "atleft( dup not { pop2nd } if" newdef "whole(" "Pass Number Through Check If Whole" "Exec" % "number --> number whole" "dup whole" newdef "unwhole(" "Pass Number Through Check Negative or Zero" "Exec" % "number --> number not-whole" "dup unwhole" newdef "whole?" "Pass Number Through If Whole" "Exec" % "number --> [ number ] is-whole" "whole( dup not { pop2nd } if" newdef "unwhole?" "Pass Number Through If Negative or Zero" "Exec" % "number --> [ number ] not-whole" "unwhole( dup not { pop2nd } if" newdef "00000000-0000-0000-0000-000000000000" !Mojo.EmptyGuid "guid?" "Non-Empty Guid and Guid on Stack" "Exec" % "guid --> [ guid ] non-empty" "dup _Mojo.EmptyGuid ne$ { true } { pop false } ifelse" newdef "seq112" "Sequence Stack First First Second Item" "Exec" % "2nd 1st --> 1st 1st 2nd" "dup rot" newdef "seq221" "Sequence Stack Second Second First Item" "Exec" % "2nd 1st --> 2nd 2nd 1st" "second exch" newdef "exists(?" "Does File Exist and Keep Filespec" "Exec" % "filespec --> filespec exists" "dup exists" newdef "text?bin_" "Get Lookup Item Names From Bin Text File" "Exec" % "root-name --> [ . . . ] count" "text_bin lookstr_" newdef "nospc$" "Replace All Spaces With Underline" "Exec" % "str --> adj-str" "Str.NoSpaces" newdef "deparen" "Extract Parenthesized String and Left Of" "Exec" % "str --> left-part parened" '"(" slice ")" left$' newdef "spread" "Enumerate Gathered Elements" "Exec" % "--> [ . . . count ] items-present" "_builder lookstr_ dupnzis" newdef "gather" "Collect Elements Into Lookup" "Exec" % "empty [ . . . ] -->" " { isnull ? _builder exch lookstr? { !builder } if } loop pop " newdef "exec$" "Execute File Untranslated" "Exec" % "file-spec --> [ . . . ]" "read execstr" newdef "text?bin" "Lookup Action for Text File in Bin" "Exec" % "lookup file-root --> [ . . . ] found" "text ofbin exch Str.NoSpaces exch lookin" newdef "looked" "Create Lookup Item" "Exec" % "lookup --> lookup-format" 'nospc$ ^"|" &" "' newdef "val:&hex" "Add String From Hex to Named Value" "Exec" % "data-to-add val -->" "dup _ rot hex2asc & exch !" newdef "val:&" "Add to Named Value" "Exec" % "data-to-add val -->" "dup _ &3) exch !" newdef "join2)" "Join Top Two Items With Third and Fourth Items" "Exec" % "item1 item2 item3 item4 --> item1&item3 item2&item4" "^3) exch &3) exch" newdef "quo&comma" "Quote and Append Comma" "Exec" % "build str --> adj-build" 'quoter & &","' newdef "normcomma" "Normalize Commas and Whitespace" "Exec" % "build str --> adj-build" ' trim ret empty replall lf commas " ," commas ", " commas ",," commas dup 1 right "," eq$ { -1 right } if ' newdef "oftemp" "Prefix Temp Work Folder" "Exec" % "srvc-name --> dir-file-part" '"c:\___Work" folder ^' newdef "write(" "Overlay Write Keeping Dest File" "Exec" % "data dest-file --> dest-file" 'to3rd write' newdef "safeto" "Overlay Write File Extended" "Exec" % "data dest-file dest-ext -->" 'tuck write( exch overext' newdef "ofmark" "Prefix Extension of Marks Folder" "Exec" % "markroot -->" '"Marks\" ofbin ^ jpeg' newdef "ofnark" "Prefix Extension of Narks Folder" "Exec" % "markroot -->" '"Narks\" ofbin ^ jpeg' newdef "textover" "Rename to Text with Overwrite" "Exec" % "file -->" '".txt" overext' newdef "textwild" "Append Text to Wildcard Set" "Exec" % "prefix -->" '&"*.txt" !wilder' newdef "safetext" "Overlay Write File Text Extended" "Exec" % "data dest-file -->" 'write( textover' newdef "overtext" "Overlay File Copy and Text Extended" "Exec" % "src-file dest-file -->" 'copyfile( textover' newdef "oversafe" "Overlay Rextended File and Text Extended" "Exec" % "dest-file new-dest-text -->" 'second exch reextend overtext' newdef "overto" "Overlay Copy Rextended File and Extended" "Exec" % "src-file dest-file new-dest-ext -->" 'tuck copyfile( exch overext' newdef "residual" "Create Residual File and Extended Proto File" "Exec" % "file-data out-file dest-ext --> proto" 'tuck write( dup rot reextend copyfile(' newdef "hideus" "Hide the Fire and Help Forms" "Exec" % "-->" 'helpoff false current' newdef "showus" "Show the Fire and Help Forms" "Exec" % "-->" 'true current helpon' newdef *defcmndr *defcnctr *defhelps *defiling *deftimed *deflocal /* "v" "n" "Exec" % "-->" "a" newdef */