Update GloVar
parent
65a23ab3fa
commit
5aad2afd42
@ -1,7 +1,7 @@
|
||||
# Global Variables
|
||||
I created something so that I can always have multiple strings at my fingertips. Its like a clipboard manager but different.
|
||||
|
||||
**First time setup:** Create [`GloVar.ini`](https://daviddaily.dev/david/d3k/src/branch/master/glovarsource) and [`emails.csv`](https://daviddaily.dev/david/d3k/src/branch/master/emails.example.csv) in `My Documents`
|
||||
**First time setup:** Create [`GloVar.ini`](https://daviddaily.dev/david/d3k/src/branch/master/glovarsource) in `My Documents`
|
||||
|
||||
## Top-level overview
|
||||
What it does is take an `ini` (based off [this](https://daviddaily.dev/david/d3k/src/branch/master/glovarsource)) and turn it into hotstrings that start with `$` automagically. The Key (left side of the `=`) is the hotstring, the Value (right side of the `=`) is what it gets replaced with.
|
||||
@ -42,7 +42,7 @@ If the last stored modified time the script made is different than its last modi
|
||||
|
||||
Every time we process the `ini`, we completely destroy the automagically created file because that is the easiest way to make sure there isn't any extra stuff in there.
|
||||
|
||||
Next, we loop though each line, with regex putting the section name in `RESection` and if it is a Key/Value pair it puts the Key in `REKey` and the Value in `REValue` (wow, what a surprise). If it is under the "Serial Numbers" section it gets made uppercase and the uppercase value is written to the ini. ~~If it is under the "Operations Center" section and the key is `usr` (use it for username, usually only have one), it does the same thing. If the Key is `case`, it strips the `( )` off the front and the back.~~
|
||||
Next, we loop though each line, with regex putting the section name in `RESection` and if it is a Key/Value pair it puts the Key in `REKey` and the Value in `REValue` (wow, what a surprise). If it is under the "Serial Numbers" section it gets made uppercase and the uppercase value is written to the ini. If it is under the "Info" section and the key is `case`, it strips the `( )` off the front and the back.
|
||||
|
||||
~~If the Key is `xid`, we do some more work. I have a CSV I keep of people I talk to ([example here](https://daviddaily.dev/david/d3k/src/branch/master/emails.example.csv)) that is up to 387 lines. It is also easily added to with [addemail.ahk](https://daviddaily.dev/david/d3k/src/branch/master/addemail.ahk). If the unique identifier of the caller (xID) is found in the CSV, it fills in the details in the `ini` and in the hostrings. If it is not found, we run [addemail.ahk](https://daviddaily.dev/david/d3k/src/branch/master/addemail.ahk) to add their info to the table.~~
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user