Skip to content

Instantly share code, notes, and snippets.

@lundeen-bryan
Last active April 17, 2024 03:19
Show Gist options
  • Save lundeen-bryan/3b8b5f5c9242287a83ac2a03e12f4fff to your computer and use it in GitHub Desktop.
Save lundeen-bryan/3b8b5f5c9242287a83ac2a03e12f4fff to your computer and use it in GitHub Desktop.
MISC

ACRExtensions_bookmarklet_README

The Bookmarklet

Note, it appears to not work anymore, but some of it is documented in the following ccimpoiACRExtensions Amazon Cloud Reader extensions

javascript:(()%3D%3E%7Bfunction%20enhanceKindleContextMenu()%7Bvar%20e%3Dnull%2Cn%3Dnull%2Co%3Dnull%3Bif(void%200!%3D%3Dwindow.KindleReaderContextMenu)e%3Dwindow%3Belse%20if(window.length)for(var%20t%3D0%3Bt%3Cwindow.length%3Bt%2B%2B)if(void%200!%3D%3Dwindow%5Bt%5D.KindleReaderContextMenu)%7Be%3Dwindow%5Bt%5D%3Bbreak%7Dif(%22object%22%3D%3Dtypeof%20e)if(o%3De.KindleReaderContextMenu%2Cn%3De.document%2Cvoid%200%3D%3D%3Do.ACRExtensions)%7Bo.ACRExtensions%3D!0%3Bvar%20i%3Do.show%3Bo.show%3Dfunction()%7Bvar%20e%3Di.apply(o%2Carguments)%2Ct%3Dnull%2Cs%3Dnull%3Bif(void%200!%3D%3Darguments%5B3%5D%26%26void%200!%3D%3Darguments%5B3%5D.start)%7Bvar%20d%3Darguments%5B3%5D.start%2Cr%3Darguments%5B3%5D.end%3B%24(%22iframe%22%2Cn).each((function(e%2Cn)%7Bvar%20o%3D%24(n).contents().get(0)%3Bif(%24(%22%23%22%2Bd%2Co).get(0))return%20t%3Do%2C!1%7D))%2Ct%26%26((s%3Dt.createRange()).setStartBefore(%24(%22%23%22%2Bd%2Ct).get(0))%2Cs.setEndAfter(%24(%22%23%22%2Br%2Ct).get(0)))%7D%24(%22%23ACRExtensions_copyB_sep%22%2Cn).remove()%2C%24(%22%23ACRExtensions_copyB%22%2Cn).remove()%3Bvar%20a%3D%24('%3Cdiv%20id%3D%22ACRExtensions_copyB_sep%22%20class%3D%22kindle_menu_separator%22%3E%3C%2Fdiv%3E')%2Cl%3D%24('%3Cdiv%20id%3D%22ACRExtensions_copyB%22%20class%3D%22kindle_menu_button%20button_enabled%20ui-corner-left%22%3ECopy%3C%2Fdiv%3E')%3Breturn%20%24(%22%23kindle_menu_border%22%2Cn).append(a).append(l)%2CsetTimeout((function()%7Ba.show()%2Cl.removeClass(%22button_hidden%22)%7D)%2C1)%2C%24(%22%23ACRExtensions_copyB%22%2Cn).click((function(e)%7Bs%26%26window.open(%22%22%2C%22ACRExtensions%22%2C%22height%3D400%2Cwidth%3D400%2Clocation%3D0%2Cmenubar%3D0%2Cscrollbars%3D1%2Ctoolbar%3D0%22).document.body.appendChild(s.cloneContents())%7D))%2Ce%7D%2Calert(%22ACRExtensions%20is%20now%20active.%22)%7Delse%20alert(%22ACRExtensions%20is%20already%20active.%22)%3Belse%20alert(%22Error%3A%20ACRExtensions%20is%20not%20active.%20The%20Amazon%20Cloud%20Reader%20window%20could%20not%20be%20found.%22)%7D%7D)()%3B

What it Does

This JavaScript code is designed to be executed as a bookmarklet on a webpage. Here's a breakdown of its functionality:

  1. Initialization:

    • The code begins by declaring and initializing a few variables (w, kDoc, and kObj).
    • It then checks if the current window has a defined KindleReaderContextMenu. If it does, it sets the variable w to the current window. If it doesn't find it in the current window, it loops through each window frame (typically from iframes) to look for it.
  2. Check for KindleReaderContextMenu:

    • If it successfully finds an instance of KindleReaderContextMenu, the code sets the kObj to that instance and kDoc to the document of that window.
    • It then checks if the ACRExtensions property exists within the KindleReaderContextMenu. If it does not, it modifies the behavior of the KindleReaderContextMenu:
  3. Modifying KindleReaderContextMenu:

    • The original show method of KindleReaderContextMenu is stored in oldMethod.
    • The show method is then overridden to add new functionality. Specifically, it:
      • Checks for the presence of specific arguments passed to this method. If these arguments exist, it appears to identify a range within an iframe (probably a text selection in the Kindle Cloud Reader).
      • Creates a range that corresponds to the start and end IDs provided in the arguments.
      • Removes any previous extensions elements (ACRExtensions_copyB_sep and ACRExtensions_copyB).
      • Adds a new separator (sepEl) and a "Copy" button (copyB) to the Kindle context menu.
      • The "Copy" button, when clicked, opens a new window and appends the contents of the previously created range to this new window.
    • After overriding the show method, it alerts the user that "ACRExtensions is now active."
  4. ACRExtensions Active:

    • If the ACRExtensions property already exists, it simply alerts the user that "ACRExtensions is already active."
  5. Error Handling:

    • If no KindleReaderContextMenu is found in the current window or any of its frames, it alerts the user with the message "Error: ACRExtensions is not active. The Amazon Cloud Reader window could not be found."

In simpler terms, this bookmarklet seems to be an enhancement for the Amazon Cloud Reader's context menu. When invoked, it adds a "Copy" button to the context menu, allowing users to copy selected content from the Amazon Cloud Reader into a new window.

The provided bookmarklet is a URL-encoded version of the JavaScript code. Let's decode it to understand the changes you've made:

Decoding the URL-encoded bookmarklet gives us:

javascript: (() => {
    function enhanceKindleContextMenu() {
        var e = null,
            n = null,
            o = null;
        if (void 0 !== window.KindleReaderContextMenu) e = window;
        else if (window.length)
            for (var t = 0; t < window.length; t++)
                if (void 0 !== window[t].KindleReaderContextMenu) {
                    e = window[t];
                    break;
                }
        if ("object" == typeof e)
            if ((o = e.KindleReaderContextMenu, n = e.document, void 0 == o.ACRExtensions)) {
                o.ACRExtensions = !0;
                var i = o.show;
                o.show = function() {
                    var e = i.apply(o, arguments),
                        t = null,
                        s = null;
                    if (void 0 !== arguments[3] && void 0 !== arguments[3].start) {
                        var d = arguments[3].start,
                            r = arguments[3].end;
                        $("iframe", n).each((function(e, n) {
                            var o = $(n).contents().get(0);
                            if ($("#" + d, o).get(0)) return t = o, !1
                        })), t && ((s = t.createRange()).setStartBefore($("#" + d, t).get(0)), s.setEndAfter($("#" + r, t).get(0)))
                    }
                    $("#ACRExtensions_copyB_sep", n).remove(), $("#ACRExtensions_copyB", n).remove();
                    var a = $('<div id="ACRExtensions_copyB_sep" class="kindle_menu_separator"></div>'),
                        l = $('<div id="ACRExtensions_copyB" class="kindle_menu_button button_enabled ui-corner-left">Copy</div>');
                    return $("#kindle_menu_border", n).append(a).append(l), setTimeout((function() {
                        a.show(), l.removeClass("button_hidden")
                    }), 1), $("#ACRExtensions_copyB", n).click((function(e) {
                        s && window.open("", "ACRExtensions", "height=400,width=400,location=0,menubar=0,scrollbars=1,toolbar=0").document.body.appendChild(s.cloneContents())
                    })), e
                }, alert("ACRExtensions is now active.")
            } else alert("ACRExtensions is already active.");
        else alert("Error: ACRExtensions is not active. The Amazon Cloud Reader window could not be found.")
    }
})();

Changes From the Original

  1. Arrow Function: The code is now wrapped in an ES6 arrow function.
  2. Variable Naming: Variable names have been shortened (w to e, kDoc to n, kObj to o, and so on). This is possibly to reduce the overall size of the bookmarklet.
  3. Checking for Undefined: You've changed the typeof checks for undefined to use void 0 !== variableName, which is another way to check if a variable is undefined.
  4. Use of ES6 Features: The function uses more ES6 features, such as arrow functions for callback functions.
  5. Code Compression: The code has been compressed for brevity, removing unnecessary spaces and using more concise expressions. This is common in bookmarklets to minimize the length.

The logic of the function remains consistent with the previous version, but these changes make the bookmarklet more compact and updated to newer JavaScript syntax.

//use this schema to do alt row shading, use format current view in modern sharepoint and apply to entire row
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json",
"additionalRowClass": "=if(@rowIndex%2==0,'ms-bgColor-themeLight','')"
}
#!/bin/bash
: ' here-doc ends with the next single quote below:
SCRIPT NAME: get_files_in_e.sh
DESCRIPTION:
This script lists files of specified extensions from a given directory, displaying them in a tree-like structure.
The results are saved to a text file in the users "Downloads" folder. At the end, the script reports the total
number of files listed and the number of folders containing these files.
USAGE:
Run the script using:
./get_files_in_e.sh
Upon execution, the script will prompt the user for:
1. A directory path (e.g., /e/)
2. File extensions, separated by commas without spaces (e.g., .epub,.pdf)
AUTHOR:
[Your Name or Handle]
DATE:
[Date of Creation or Last Modification]
'
# Ask the user for the starting directory
read -p "Please enter the directory path (e.g., /e/): " START_DIR
# Ensure the directory exists
if [ ! -d "$START_DIR" ]; then
echo "Directory $START_DIR does not exist!"
exit 1
fi
# Ask the user for file extensions (comma-separated, without spaces)
read -p "Enter file extensions separated by commas (e.g., .epub,.pdf): " INPUT_EXTENSIONS
# Convert the comma-separated extensions into a format suitable for the find command
IFS=',' read -ra EXT_ARRAY <<< "$INPUT_EXTENSIONS"
FIND_EXPRESSION=""
for ext in "${EXT_ARRAY[@]}"; do
if [ -z "$FIND_EXPRESSION" ]; then
FIND_EXPRESSION="-iname '*$ext'"
else
FIND_EXPRESSION="$FIND_EXPRESSION -o -iname '*$ext'"
fi
done
# File to save the output
OUTPUT_FILE=~/Downloads/files_found.txt
# Change to the starting directory
cd "$START_DIR" || exit 1
# Find and list files with the given extensions in a tree structure and save to the output file
eval "find . -type f \( $FIND_EXPRESSION \) | sed -e 's;[^/]*/;|----;g;s;----|; |;g'" > "$OUTPUT_FILE"
# Count the number of files listed
file_count=$(eval "find . -type f \( $FIND_EXPRESSION \)" | wc -l)
# Count the number of directories containing the files
folder_count=$(eval "find . -type f \( $FIND_EXPRESSION \) -exec dirname {} \; | sort -u" | wc -l)
echo "Listing has been saved to $OUTPUT_FILE."
echo "Total number of files listed: $file_count"
echo "Total number of folders containing the files: $folder_count"
SELECT name FROM sqlite_master WHERE type='table'
/*markdown
| name |
|-------------------|
| ice_cream_flavors |
*/
/*markdown
## EXAMPLE OF A SQLITE SQL NOTEBOOK
Just some example randomly ha
*/
SELECT * FROM ice_cream_flavors
/*markdown
| id | flavor | rating |
|----|-----------|--------|
| 1 | choco | 10 |
| 2 | straw | 9 |
| 3 | pistachio | 7.2 |
*/
| |----1 and 2 Esdras - Ancient Texts.epub
| |----1 and 2 Esdras.pdf
| |----1 & 2 Maccabees.pdf
| |----1 & 2 Maccabees - Ancient Texts.epub
| |----315 Genesis of All Prophecy.pdf
| |----315 Genesis of All Prophecy - Rabbi Eric E. Walker.epub
| |----Abaddon Ascending - Thomas R. Horn.epub
| |----Abaddon Ascending.pdf
| |----Afterlife - Donna Howell, Josh Peck,.epub
| |----Afterlife.pdf
| |----Ahriman Gate - Thomas R. Horn.epub
| |----Ahriman Gate.pdf
| |----Alliance of Evil - LTC. Robert L. Maginnis.epub
| |----Alliance of Evil.pdf
| |----Angels On Assignment Again - Jennifer LeClaire.epub
| |----Angels On Assignment Again.pdf
| |----Antichrist and the Final Solution 8.17 prepared for Kindle (1).pdf
| |----Antichrist and the Final Soluti - Tom Horn.epub
| |----Bad Moon Rising - Derek Gilbert.epub
| |----Bad Moon Rising.pdf
| |----Beast Tech.pdf
| |----Beast Tech - Thomas R. Horn.epub
| |----Blood on the Altar - Thomas R. Horn.epub
| |----Blood on the Altar.pdf
| |----Book of Enoch - Ancient Texts.epub
| |----Book of Enoch.pdf
| |----Jasher.pdf
| |----Jasher - Ancient Texts.epub
| |----Jubilees.pdf
| |----Jubilees - Ancient Texts.epub
| |----Book of Judith.pdf
| |----Book of Judith - Ancient Texts.epub
| |----Book of Sirach.pdf
| |----Book of Sirach.epub
| |----Tobias - Ancient Texts.epub
| |----Tobias.pdf
| |----Book of Wisdom.pdf
| |----Book of Wisdom - Ancient Texts.epub
| |----Brotherhood of Darkness - Dr. Stanley Monteith.epub
| |----Brotherhood of Darkness.pdf
| |----Cauldron.pdf
| |----Cauldron - Terry James.epub
| |----Christmas Classics.pdf
| |----Christmas Classics - collaborative.epub
| |----COLLISION COURSE20.pdf
| |----COLLISION COURSE - LTC. Robert L. Maginnis.epub
| |----Conmpanion to the book of Enoch - Michael Heiser.epub
| |----Conmpanion to the book of Enoch Vol 2.pdf
| |----Companion to the book of Enoch.pdf
| |----A Companion to the Book of Enoc - Dr. Michael S. Heiser.epub
| |----Dark Covenant.pdf
| |----Dark Covenant - Donna Howell.epub
| |----The Day the Earth Stands Still - Derek P. Gilbert.epub
| |----The Day the Earth Stands Still.pdf
| |----Dead Pets Don't Lie - Joe Ardis.epub
| |----Dead Pets Don't Lie.pdf
| |----Deeper State, The.pdf
| |----Deeper State, The - LT. COL. Robert Maginnis.epub
| |----Demonomics - Terry James.pdf
| |----Demonomics - Terry James.epub
| |----Departure, The - Terry James.epub
| |----Departure, The.pdf
| |----Devils and Evil Spirits of Baby - R. Campbell Thompson, M.A_.epub
| |----Devils and Evil Spirits of Babylonia, The.pdf
| |----Dispensations The Clarence Lark - Clarence Larkin.epub
| |----Project - Clarence Larkin Collection.pdf
| |----Do our pets go to Heaven - Terry James, Thomas Horn.pdf
| |----Do our pets go to Heaven - Terry James, Thomas Horn.epub
| |----Earth's Earliest Ages - George H. Pember.epub
| |----Earth's Earliest Ages.pdf
| |----Ebenezer the Final Years of Scrooge RECOVERED AND REBUILT NOV 2019.pdf
| |----Ebenezer_ The Final Years of Sc - Donna Howell.epub
| |----Encounters.pdf
| |----Encounters - Allie Anderson.epub
| |----Endtimes Investigations with Da - David Heavener.epub
| |----Endtimes Investigations with David Heavener.pdf
| |----Everyday Champions - Joe Horn.epub
| |----Everyday Champions.pdf
| |----Exo-Vaticana - Thomas R. Horn.epub
| |----Exo-Vaticana.pdf
| |----Fallen Angels and the Heroes of Mythology, The.pdf
| |----Fallen Angels and the Heroes of - Rev. John Fleming, A.B_.epub
| |----Final Fire - Thomas Horn, Larry Spargimino.epub
| |----Final Fire.pdf
| |----Final Roman Emperor, The.pdf
| |----Final Roman Emperor, The - Thomas Horn.epub
| |----Forbidden Gates.pdf
| |----Forbidden Gates - Thomas R. Horn.epub
| |----Forbidden Gates TEACHER'S GUIDE.epub
| |----Forbidden Gates TEACHER'S GUIDE.pdf
| |----Labryinth for Kindle FINAL.pdf
| |----Forbidden Secrets of the Labyri - Mark Flynn.epub
| |----Future War.pdf
| |----Future War - Lieutenant Colonel Robert L. Ma.epub
| |----GIANTS GODS DRAGONS.pdf
| |----GIANTS GODS DRAGONS.epub
| |----GIVE ME LIBERTY, NOT MARXISM - LTC Robert L. Maginnis.epub
| |----GIVE ME LIBERTY.pdf
| |----God's Ghostbusters - Collaborative.epub
| |----God's Ghostbusters.pdf
| |----Gods & Thrones - Carl Gallups.epub
| |----Gods & Thrones.pdf
| |----Gods of Ground Zero - Carl Gallups.epub
| |----Gods of Ground Zero.pdf
| |----Gods of the Final Kingdom.pdf
| |----Gods of the Final Kingdom - Carl Gallups.epub
| |----Great Inception - Derek P. Gilbert.pdf
| |----Great Inception - Derek P. Gilbert.epub
| |----Great Pyramid.pdf
| |----Great Pyramid - N. W. Hutchings.epub
| |----Handmaidens Conspiracy, The - Donna Howell.epub
| |----Handmaidens Conspiracy, The.pdf
| |----How to Overcome the Most Frightening Things You WILL Face This Century.pdf
| |----How to Overcome the Most Frightening Things You WILL Face This Century.epub
| |----I Predict.pdf
| |----I Predict - Thomas Horn.epub
| |----Immortality and the Unseen Worl - William Oscar Emil Oesterley.epub
| |----Immortality and the Unseen World.pdf
| |----Kings of the East for Kindle 5.26.22.pdf
| |----Kings of the East - Robert Maginnis.epub
| |----Unmasking the Chaldean Spirit.pdf
| |----Last Clash of the Titans - Derek P. Gilbert.epub
| |----Last Clash of the Titans.pdf
| |----Last Days Diary.pdf
| |----Last Days Diary - Terry James.epub
| |----Lawless for Kindle - Terry James.epub
| |----Lawless for Kindle.pdf
| |----Learning to Lean - Collaborative.epub
| |----Learning to Lean.pdf
| |----MASQUERADE - Carl Gallups.epub
| |----MASQUERADE.pdf
| |----Milieu, The - Collaborative.epub
| |----Milieu, The.pdf
| |----MISFITS.pdf
| |----MISFITS - Donna Howell, Allie Henson, Nit.epub
| |----Nephilim Stargates - Thomas R. Horn.epub
| |----Nephilim Stargates.pdf
| |----Never Submit.pdf
| |----Never Submit - Lt. Col. Robert Maginnis.epub
| |----No Fences.pdf
| |----No Fences - Nita Horn, Donna Howell.epub
| |----On the Path of the Immortals - Thomas R. Horn, Cris Putnam.epub
| |----On the Path of the Immortals.pdf
| |----Pandemonium's Engine.pdf
| |----Pandemonium's Engine - Collaborative.epub
| |----Petrus Romanus.pdf
| |----Petrus Romanus - Thomas R. Horn.epub
| |----Planet X - Douglas A. Elwell.pdf
| |----Planet X - Douglas A. Elwell.epub
| |----Progressive Evil - LTC. Robert L. Maginnis.epub
| |----Progressive Evil.pdf
| |----Rabbi, the Secret Message, and - Carl Gallups.epub
| |----Rabbi, the Secret Message, and the Identity of the Messiah, The.pdf
| |----Rabbis, Donald Trump...Third Temple - Thomas R. Horn.epub
| |----Rabbis, Donald Trump...Third Temple.pdf
| |----Radicals.pdf
| |----Radicals - Donna Howell.epub
| |----Redeemed Unredeemable - Thomas Horn, Donna Howell.pdf
| |----Redeemed Unredeemable - Thomas Horn, Donna Howell.epub
| |----RLOAT Vol 1.pdf
| |----RLOAT Vol 1 - Ancient Texts.epub
| |----RLOAT Vol 2.pdf
| |----RLOAT Vol 2 - Ancient Texts.epub
| |----RLOAT Vol 3.pdf
| |----RLOAT Vol 3 - Ancient Texts.epub
| |----Reversing Hermon - Dr. Michael S. Heiser.epub
| |----Reversing Hermon.pdf
| |----Saboteurs - Thomas R. Horn.epub
| |----Saboteurs.pdf
| |----Second Coming of the New Age, T - Bancarz, Peck.epub
| |----Second Coming of the New Age, The.pdf
| |----SHADOWLAND.pdf
| |----SHADOWLAND - Thamas R. Horn.epub
| |----Sheeriyth Imperative, The - Dr. Michael Lake.epub
| |----Sheeriyth Imperative, The.pdf
| |----The Shinar Directive - Dr. Michael Lake.epub
| |----The Shinar Directive.pdf
| |----Supernatural Worldview, The - Cris Putnam.epub
| |----Supernatural Worldview, The.pdf
| |----Systematic Theology Vol 1 - Augustus Hopkins Strong, D.D., .epub
| |----Systematic Theology Vol 1.pdf
| |----Systematic Theology Vol 2 - Augustus Hopkins Strong, D.D., .epub
| |----Systematic Theology Vol 2.pdf
| |----Systematic Theology Vol 3 - Augustus Hopkins Strong, D.D., .epub
| |----Systematic Theology Vol 3.pdf
| |----Temple at the Center of Time.pdf
| |----Temple at the Center of Time - David Flynn.epub
| |----Boy From El Mirage KINDLE.pdf
| |----Boy From El Mirage - Thomas Horn.epub
| |----The Defender Bible - Old Testament, New Testament, E.epub
| |----The Disappearing.pdf
| |----THE DISAPPEARING - Terry James.epub
| |----The Lost Prophecies of Qumran - Josh Peck.epub
| |----The Lost Prophecies of Qumran.pdf
| |----MESSENGER - Thomas Horn.epub
| |----MESSENGER.pdf
| |----The Omega Conspiracy - Dr. I.D.E. Thomas.epub
| |----The Omega Conspiracy RECOVERED AND REBUILT NOV 2019.pdf
| |----Second Coming Of Saturn .pdf
| |----Second Coming Of Saturn - Derek P. Gilbert.epub
| |----SUMMONING.pdf
| |----The Summoning_ Preparing for th - Carl Gallups.epub
| |----The Warrior-Priest Mindset - Drew Graffia.epub
| |----The Warrior-Priest Mindset.pdf
| |----Timebomb.pdf
| |----Timebomb - Joe Horn, Allie Anderson.epub
| |----TRAJECTORY - Terry James.epub
| |----TRAJECTORY FOR KINDLE (1).pdf
| |----Triumph of the Redeemed - Brentner, Jonathan C.epub
| |----Triumph of the Redeemed.pdf
| |----True Power - David Heavener.epub
| |----True Power.pdf
| |----Trump Prophecies, The.pdf
| |----Trump Prophecies, The - Mark Taylor.epub
| |----Unearthing the Lost World of th - Thomas R. Horn.epub
| |----Unearthing the Lost World of the Cloudeaters.pdf
| |----Unlocking Eden KINDLE.pdf
| |----Unlocking Eden KINDLE - Joe Horn.epub
| |----Unmasking the Chaldean Spirit.pdf
| |----Unmasking the Chaldean Spirit - Zev Porat.epub
| |----Unraveling the Multiverse - Josh Peck.epub
| |----Unraveling the Multiverse.pdf
| |----Unscrambling the Millennial Par - Allie Anderson.epub
| |----Unscrambling the Millennial Paradox.pdf
| |----Veneration - Sharon K. Gilbert, Derek P. Gil.epub
| |----Veneration.pdf
| |----Occult Theocrasy Vol 1 - Lady Queenborough.epub
| |----Occult Theocrasy - Volume 1.pdf
| |----Occult Theocrasy Vol 2 - Lady Queenborough.epub
| |----Occult Theocrasy - Volume 2.pdf
| |----We Walk by Faith_.Not by Sight - Dorothy Spaulding.epub
| |----We Walk by Faith...Not by Sight.pdf
| |----What Dwells Beyond - Jeffrey W. Mardis.epub
| |----What Dwells Beyond.pdf
| |----When Once We Were a Nation.pdf
| |----When Once We Were a Nation - Collaborative.epub
| |----Zeitgeist 2025 - Thomas Horn.epub
| |----Zeitgeist 2025 .pdf
| |----Zenith 2016.pdf
| |----Zenith 2016 - Thomas R. Horn.epub
fix_filename() {
if [[ $# -eq 0 ]]; then
echo "Usage: fix_filename <filename or directory> [recursive true/false]"
return 1
fi
local target="$1"
local recursive="${2:-false}" # Default to false if not provided
rename_item() {
local item="$1"
# Use sed to replace '+' and '-', spaces with '_', and make lowercase
local new_name=$(echo "$item" | sed -e 's/[+ -]/_/g' | tr '[:upper:]' '[:lower:]')
if [[ -z "$new_name" ]]; then
echo "Error: New name for '$item' is empty. Skipping."
return 1
fi
if [[ "$item" != "$new_name" ]]; then
if [[ -e $new_name ]]; then
echo "Error: '$new_name' already exists. Skipping '$item'."
else
mv -- "$item" "$new_name"
echo "Renamed '$item' to '$new_name'"
fi
fi
}
if [[ -d $target ]]; then
if [[ $recursive == true ]]; then
find "$target" -depth ! -path "$target" -print0 | while IFS= read -r -d $'\0' item; do
dir_path=$(dirname "$item")
base_name=$(basename "$item")
pushd "$dir_path" > /dev/null
rename_item "$base_name"
popd > /dev/null
done
else
dir_path=$(dirname "$target")
base_name=$(basename "$target")
pushd "$dir_path" > /dev/null
rename_item "$base_name"
popd > /dev/null
fi
elif [[ -e $target ]]; then
rename_item "$target"
else
echo "Error: '$target' does not exist."
return 1
fi
}

USER

The following is a job description and I'd like to ask you some questions about it.

# Job Description

## Percentage of total duties and description of tasks

**40%**
Using complex code (Visual Basic, SQL, Javascript), designs and implements database systems that organize and disseminate pertinent fiscal information (MIRS, SAP, Position Authority) to BMB, CDCR’s executive management, and control agencies. Utilizes MS Access databases, Excel and SQL to gather, format, and disseminate fiscal reports and position authority information in order to provide reports to management upon request.

**30%**
Maintains and improves existing complex coding for database operational efficiency in order to conduct daily, weekly and monthly data maintenance tasks. Automates routine tasks to eliminate repetitive work performed by branch analysts. Automates budget change data entry into the Fi$Cal system. Performs monthly upload of MIRS data to SQL server tables.

**15%**
Acts as the technical advisor and provides assistance and training to branch staff in the use of custom automation software. Investigates staff’s information technology issues and provides solutions and alternatives in order to achieve the best use of available multifunction automated office systems and hardware.

**5%**
Maintains procedures, documentation and standards for in‐house database systems (Costing Master, Vacancy Report, Position Recap, Allotment database).

**5%**
Performs other related special proposals and budget duties as required.

**5%**
Perform administrative duties including, but not limited to: adhere to Department policies, rules and procedures; submit administrative requests including leave, travel, and training in a timely and appropriate manner; accurately report time, and submit timesheets by the due date.

ASSISTANT

Sure, based on the provided job description, please go ahead and ask your questions!

USER

I'm also going to provide for you an SOQ that I wrote for this job to show my qualifications. After you review the SOQ, don't reply with anything yet. Just let me know you've reviewed both the job description and my SOQ.

Core Competencies: My experience and education have equipped me with essential skills such as database system design and implementation, data analysis, project management, bridging IT and business units, application development, stakeholder collaboration, data visualization, and effective communication.
Database System Design & Implementation: At DSH-Napa, I spearheaded the "EZ Logger" project, a comprehensive database system. Beyond basic CRUD operations, it incorporated advanced features such as automated data validation, conditional logic flows, and integration with other in-house tools. I employed complex SQL procedures and implemented normalization principles to ensure scalability and robustness, making the system flexible for future enhancements. This system improved operational efficiency by 73% and reduced errors by 68%.
Technical Initiatives & Application Development: In managing the "CourtReports" application, I faced a challenging task when the business rules governing report submission timelines underwent a pivotal shift. Previously, the system operated on a straightforward cadence: a patient's initial report was due 90 days post-commitment, with subsequent reports due every six months. The updated rules introduced a conditional dependency; if the 90-day report was completed early, all ensuing report timelines would hinge on that early completion date. This modification was applicable only for patients admitted after April 20, adding another layer of complexity.
I re-engineered the SQL code rather than employing the earlier method that relied heavily on multiple sub-queries. By integrating a Common Table Expression (CTE), I transitioned the logic from a disjointed multi-sub-query structure to a more streamlined, efficient, and readable format. This made the solution more performant and significantly enhanced maintainability, ensuring that future modifications could be made with minimal friction. Such experiences showcase my approach of constantly seeking ways to bridge the technical-business divide, ensuring our IT solutions are robust, agile, and aligned perfectly with ever-evolving business needs.
My experience with TestPro further complemented this hands-on approach to application development and adjustment. During this boot camp, I was deeply involved in the practical application of the Scrum framework, often taking on the role of the "Scrum Master." Our team leveraged Jira to track our progress meticulously, and our daily stand-ups fortified our project's direction and momentum.
Technical Proficiency & Solution Development: My proficiency spans a broad spectrum of tools and languages, each judiciously selected for the task. A compelling instance of this was my response to the constraints posed before we had licensing for Adobe Pro. Recognizing the pressing need to merge PDF documents for court submissions, I developed a Python script that replicated the merging capabilities of Adobe Pro. This temporary solution ensured the continuity of critical workflows, minimizing disruptions. Later, once Adobe Pro was licensed, I leveraged Visual Basic to interface with the Adobe Acrobat API, further automating converting and merging PDFs and streamlining our document management processes. My toolkit, from scripts in AutoIT, Python, and Visual Basic to methodologies imbibed from TestPro boot camp, underpins my constant drive to innovate and refine our IT solutions, ensuring they always serve as robust, agile bridges between our technological and business requirements.
Meeting Facilitation & Training: As the Scrum Master during my time with TestPro, I regularly facilitated our daily stand-up meetings, ensuring that each member was aligned, issues were promptly addressed, and collaboration was at its peak. This experience strengthened my ability to convey complex IT concepts, drive team collaboration, and ensure that projects remained on track and within the set timelines. This iterative, feedback-driven approach has been instrumental in managing projects and fostering mutual respect and understanding among my teammates.
Data Analysis & Reporting: During my tenure at DSH-Napa, I regularly harnessed data-driven insights to make informed decisions. However, a pivotal aspect of my role was the ability to convey these insights, which I achieved through carefully crafted presentations. My academic journey at the University of Phoenix instilled in me the skills to develop and deliver impactful PowerPoint presentations. These skills were further sharpened at Napa State Hospital, where I frequently took the lead in elucidating complex data findings to diverse groups. Utilizing digital tools like PowerPoint and traditional methods like hand-drawn diagrams on a whiteboard, I ensured that my audience, regardless of their technical proficiency, gained a clear and actionable understanding of the information presented. This dual skill set –deriving insights and effectively communicating them – underscored my commitment to driving informed, data-driven strategies at every juncture.
Project Management & Compliance: Ensuring compliance with standards like HIPAA and the ability to identify risks proactively proves my commitment to both the project management and compliance facets of the Associate Business Systems Analyst role.
Providing Excellent Customer Service: In my role at DSH-Napa, I was approached by a department head who was overwhelmed with the intricacies of managing multiple doctors' reports and ensuring their timely delivery to the court. Recognizing the urgency and importance of this request, I initiated a thorough consultation to understand their exact needs and pain points. I employed my technical skills and knowledge to develop "EZ Logger," a database system that streamlined the process. My commitment to service didn't end with the system's deployment; I ensured every user was trained effectively, adapting my training approach to suit each user's proficiency level. I also set up a feedback loop, regularly checking in to address any concerns or improvements, underscoring my unwavering commitment to customer satisfaction and success.

ASSISTANT

I've reviewed both the job description and your Statement of Qualifications (SOQ). Please proceed with your questions or let me know how I can assist further.

USER

Lastly, I'd like you to act as a job coach and use the given information to help me answer some general interview questions below. After reviewing the questions, start with some general advice that a job coach might offer.

general interview questions that are commonly asked:

1. **Introductory Questions**:
   - Tell me about yourself.
   - How did you hear about this position?

2. **Experience & Background**:
   - Can you explain the gaps in your work history?
   - Describe a challenge you've faced at work and how you dealt with it.
   - How does your previous experience prepare you for this role?

3. **Behavioral/Situational Questions**:
   - Describe a time when you had to work with a difficult colleague. How did you handle it?
   - Can you provide an example of a project that did not go as planned and how you managed it?
   - Describe a situation where you went above and beyond for a customer or colleague.

4. **Motivational Questions**:
   - Why do you want this job?
   - Why should we hire you?
   - Where do you see yourself in 5 years?

5. **Cultural Fit & Team Dynamics**:
   - What kind of work environment do you thrive in?
   - Describe a time when you disagreed with a team member. How did you resolve it?
   - How do you handle feedback or criticism?

6. **Work Ethics & Problem Solving**:
   - Describe a time when you had to handle a high-pressure situation.
   - How do you prioritize your tasks when faced with multiple deadlines?
   - Explain a situation where you had to solve a difficult problem. What did you do?

7. **Questions About the Company/Role**:
   - What do you know about our company?
   - What interests you about this role?
   - Do you have any concerns about the job or the company?

8. **Questions on Adaptability & Growth**:
   - How do you handle change in the workplace?
   - Can you describe a time when you had to learn a new tool or technology? How did you approach it?
   - How do you ensure continuous professional growth?

9. **Personal Qualities & Characteristics**:
   - How would your previous coworkers describe you?
   - What are your greatest strengths and weaknesses?
   - What are you most proud of in your career?

10. **Closing Questions**:
   - Do you have any questions for us?
   - What are your salary expectations?
   - When would you be available to start?

ASSISTANT

Certainly! As a job coach, here's some general advice before diving into the specific answers:

General Interview Advice:

  1. Be Authentic: Always be genuine in your answers. Interviewers can usually tell if a candidate is not being sincere. It's okay not to have a perfect answer for every question, but it's essential to be honest.

  2. Use the STAR Technique: Especially for behavioral/situational questions, structure your answers using the STAR technique:

    • Situation: Describe the situation.
    • Task: Explain the task you had at hand.
    • Action: Detail the actions you took.
    • Result: Highlight the outcomes of those actions.
  3. Prepare: Familiarize yourself with the job description and align your past experiences with the required qualifications. Practice your answers but don't memorize them to sound robotic.

  4. Body Language: Maintain eye contact, offer a firm handshake, sit up straight, and listen attentively. Your body language can say as much as your verbal responses.

  5. Ask Questions: Always have some questions ready for the interviewer. It shows your interest in the position and company.

Now, based on the provided job description and SOQ, here's how you can address some of the interview questions:

Sample Responses:

  1. Tell me about yourself.

    • I've been involved in various projects that revolve around database system design, application development, and data analysis. I pride myself on my ability to bridge the gap between IT and business units. For example, while at DSH-Napa, I developed the "EZ Logger" database system, which improved operational efficiency by 73%.
  2. Describe a challenge you've faced at work and how you dealt with it.

    • One challenge I faced was during the "CourtReports" application project. Business rules changed, introducing a conditional dependency for report submissions. I re-engineered the SQL code, using a Common Table Expression (CTE), making the system more streamlined and efficient.
  3. Why do you want this job?

    • I've always been passionate about leveraging technology to solve complex business challenges. Given my experience in database design, application development, and data analysis, I believe this role aligns perfectly with my skills and passion. The opportunity to contribute to such critical fiscal information dissemination is exciting.
  4. What kind of work environment do you thrive in?

    • I thrive in environments that promote collaboration and continuous learning. I'm at my best when I'm working with a team that values feedback and seeks innovative solutions, as I did during my time at TestPro, where we employed the Scrum framework.
  5. Describe a time when you had to handle a high-pressure situation.

    • At DSH-Napa, before obtaining an Adobe Pro license, there was an urgent need to merge PDF documents for court submissions. Recognizing the immediacy, I developed a Python script to replicate Adobe Pro's merging capabilities, ensuring the continuity of critical workflows.
  6. How do you handle change in the workplace?

    • I view change as an opportunity for growth and innovation. An example would be when the business rules for the "CourtReports" application changed. Instead of viewing it as a setback, I saw it as a chance to improve the system's efficiency and took it as a challenge.
  7. Do you have any questions for us?

    • Yes, can you describe how the team collaborates on large projects? And how does the company ensure continuous learning for its employees?

Remember, while these are sample answers tailored to your SOQ and the job description, it's crucial to adapt them to the specific dynamics of the interview and maintain authenticity. All the best with your interview!

USER

Can you please provide a few more potential answers to question 7?

ASSISTANT

Of course! Question 7 focuses on the company and the role itself, so you'll want answers that show you've done your research and genuinely care about the organization and position. Here are a few more responses tailored to the content you've provided:

  1. What do you know about our company?

    • I understand that CDCR focuses on public safety through the custody and supervision of offenders. I've also learned about the critical importance of fiscal information for the management and control agencies. Given my background in designing and implementing database systems for essential data, I believe I can contribute positively to the agency's goals.
  2. What interests you about this role?

    • I'm particularly interested in the extensive use of Visual Basic, SQL, and Javascript in the design and implementation of database systems, as highlighted in the job description. In my previous roles, I've seen firsthand how these technologies can drive efficiency and accuracy, especially in fiscal data management. The position also offers the right blend of technical challenges and opportunities for collaboration, both of which align with my strengths and passions.
  3. Do you have any concerns about the job or the company?

    • While I don't have any major concerns, I'm curious about how the department plans to adapt to emerging technologies in the future. Given the rapid pace of technological advancement, it's essential for me to understand the long-term vision for the role and the department's technology stack.

When answering these types of questions, it's always a good idea to mention specific details from the job description or the company's public information, as it shows you've taken the time to research and truly care about the position.

USER

Can you please provide a few more potential answers to the questions, "Do you have any questions for us?"

QUESTIONS FOR THEM

Certainly! Asking insightful questions at the end of an interview can demonstrate your genuine interest in the position and your eagerness to be an active participant in the company's success. Here are some potential questions based on the provided job description and your Statement of Qualifications (SOQ):

  1. About the Role:

    • How do you envision the future development and enhancement of the database systems you currently have in place?
    • Given the importance of fiscal reports and position authority information, how do you measure the success or effectiveness of these reports?
    • The job description mentions the use of MS Access databases, Excel, and SQL. Are there any other tools or platforms the department is considering integrating in the near future?
  2. About the Team & Company:

    • Can you tell me more about the team I'd be working with? What are their roles, and how do they collaborate?
    • What is the team's current biggest challenge, and how do you envision this role contributing to its resolution?
    • What does a typical career path look like for someone in this role within the department?
  3. About the Company Culture:

    • How would you describe the company's culture and values, especially when it comes to innovation and continuous improvement?
    • What type of training and professional development opportunities are available to employees in this role?
    • How does the department handle feedback and ideas from employees about improving existing processes?
  4. About the Hiring Process:

    • What are the next steps in the interview process, and what is the expected timeline for a decision?
    • How do you onboard new employees in this role to set them up for success?
    • What qualities and characteristics do the most successful individuals in this position possess?

When formulating your questions, try to ensure they reflect your genuine curiosities and concerns, showcase your research about the company or department, and underscore your commitment to making a meaningful contribution.

USER

I may have multiple questions, do I need to tell them that I have multiple questions or just start asking them questions?

ASSISTANT

It's courteous to mention that you have a few questions, so the interviewer(s) can gauge how much time they might need to allocate for this part of the discussion. It also sets a clear structure for the conversation, allowing the interviewer to mentally prepare for more than just one query.

You can introduce it in a straightforward way. For example:

  • "I do have a few questions about the role and the team. Would now be a good time to go over them?"
  • "Thank you for offering. I've prepared a couple of questions I'd like to ask to better understand the role and the company. Is that alright?"

This approach is considerate and organized. After you've asked one or two questions, be mindful of the interviewer's body language and verbal cues. If they seem pressed for time or indicate that the interview needs to wrap up, you can prioritize your most important questions and save others for a potential follow-up conversation or email.

USER

Yes I like that approach a lot. Here are some of the things I'd like to ask them about but you may need to help me word it a little better: 1) Have they considered using Python and if so would they like to know how I would use Python to help improve the processes? 2) how does the team collaborate on projects that require version control of code. They did not mention using Git or GitHub but I really feel that would be a great solution.

SUGGESTIONS

Of course! I'll help you reword your questions to sound polished and professional:

  1. Regarding Python:

    • "I noticed that the primary languages mentioned in the job description are Visual Basic, SQL, and Javascript. Out of curiosity, has the team considered or experimented with Python for any processes? Given my experience, I've found Python to be quite versatile in certain scenarios, and I'd be happy to discuss potential applications if it's of interest."
  2. Regarding Collaboration and Version Control:

    • "Can you share how the team currently manages collaboration on projects, especially when multiple versions of code are involved? I've had positive experiences using tools like Git and GitHub to streamline code version control and team collaboration. Is that something the department has considered or currently utilizes?"

These questions are structured to show both your interest in the company's processes and your willingness to bring valuable insights and experiences to the table. They also open the door for a deeper conversation on your technical expertise and its potential benefits to the team.

USER

Thank you those are great answers to the final question they are likely to ask. Now I'd like to discuss my answers to the following mock interview and see if they can be improved. Consider all the information I provided in my SOQ when reviewing the following mock interview.


Mock Interview Section

INTERVIEWER

  1. Have you had experience using complex code, specifically with languages like Visual Basic, SQL, and Javascript?

INTERVIEWEE

Yes, I have a lot of experience with all of these languages. I've written a lot of SQL and Visual Basic in particular for my current job.

INTERVIEWER

Great! Let's move to the next question.

  1. Are you familiar with fiscal information systems like MIRS, SAP, and Position Authority?

INTERVIEWEE

No, I don't think so.

INTERVIEWER

Thank you for the honest response.

  1. Have you ever designed or maintained database systems using tools like MS Access and Excel?

INTERVIEWEE

Yes, but I feel MS Access and Excel are very limited if it is going to be a long term solution. My preference would be using a SQL database. But to answer your question, I have designed and built databases for small apps using Access and Excel.

INTERVIEWER

Understood. Your preference for a SQL database is valid and could potentially be beneficial for the company.

  1. Considering the role requires improvements and maintenance of existing complex coding for database operational efficiency, have you worked on automating routine tasks or optimizing existing codes to enhance efficiency in any of your previous roles?

INTERVIEWEE

Yes, many times I've worked on VB and SQL to improve efficiency. For example, We had a very complex SQL stored procedure that merged three subqueries, but I decided to change it to a CTE which made the code easier to read and maintain.

INTERVIEWER

That's a valuable skill to have.

  1. Have you acted as a technical advisor in your previous roles, specifically providing assistance, training, or troubleshooting for staff regarding information technology issues or custom software applications?

INTERVIEWEE

Yes, where I currently work, I typically play the role of the IT liaison for the staff in the building. I typically triage problems that staff are having and if I can't fix the problem myself, I create a ticket for the technical services department (TSD) to take a look at the problem. I provide training as well to show staff basic things like connecting to a network printer or mapping a network drive.

INTERVIEWER

That's great to hear, as it aligns with the advisory role described in the job functions.

  1. Given the importance of proper documentation, have you been responsible for maintaining or creating documentation, procedures, or standards for systems or software you've worked with? If so, can you provide a brief example?

INTERVIEWEE

Yes, I've tried a number of solutions such as simple word documents, or HTML files, but what I found easiest to create and share with other users is OneNote notebooks. These contain links to resources, screenshots and I can easily update pages with new instructions when a procedure changes. I also created a number of how-to video lessons on how to use a couple of different programs we used in Forensic Services.

INTERVIEWER

Using multimedia tools like OneNote and video lessons is a forward-thinking approach and can be quite effective in communicating complex ideas.

  1. The role mentions performing "other related special proposals and budget duties." While the specifics aren't detailed here, have you had any experience with budgeting, financial proposals, or related tasks in your previous roles?

INTERVIEWEE

Yes, I'm the main person designated to do procurement for the department. So I'm very familiar with making sure my requests for products and services comply with state-wide regulations. This includes requesting a check to pay for these products or services.

INTERVIEWER

That's a valuable experience, especially in roles requiring budget and financial responsibilities.

  1. Regarding administrative duties, have you managed tasks such as submitting administrative requests, reporting time, adhering to departmental policies, and ensuring compliance with procedures and deadlines in your current or previous roles?

INTERVIEWEE

Yes, at one point I created an Excel workbook to help track and report time. I also make sure I adhere to departmental policies and compliance. I'm very good at handling deadlines. I typically use a modified agile approach with a Scrum board to track tasks.

INTERVIEWER

Excellent, leveraging agile methodologies like Scrum can be very effective in managing tasks and deadlines.

  1. In the context of collaborating with a team or department, how comfortable are you in adapting to new tools, software, or methods that might already be in place when you join a new role, even if they aren't your personal preference?

INTERVIEWEE

I'm always open to learning new tools, software and methods. Usually I learn these things very fast and train others on them as well. However, I have enough broad experience to recognize where a department might benefit from trying something different. So if this department is using MS Access, although I'm very proficient in Acess, if we have the ability to transition to a more robust model in SQL server, I would present my evidence for such a proposal at the right time in hopes of helping the department improve productivity.

INTERVIEWER

That's a great balance of adaptability and initiative.

  1. Lastly, given that the job description emphasizes the importance of disseminating fiscal reports and information to various stakeholders, how would you rate your communication skills, especially when it comes to explaining complex technical data or solutions to non-technical stakeholders?

INTERVIEWEE

I'm very used to communicating with non-technical people such as doctors and social workers at the hospital where I'm at now. I often have to describe things like metadata and unique keys to people who like to store information in Excel spreadsheets and describe the advantages of using a SQL server or even SharePoint.

INTERVIEWER

Your experience in bridging the gap between technical and non-technical stakeholders is certainly invaluable. Given your responses to the screening questions, you seem to have a strong alignment with many of the job functions listed in the description. While there might be certain areas (like the specific fiscal systems) that you'd need to familiarize yourself with, your breadth of experience in coding, database management, documentation, training, and communication make you a strong contender for the position.


ASSISTANT

Overall, your responses during the mock interview are quite strong and paint a picture of someone who has a broad range of skills and experiences that align well with the job description.

However, let's polish a few of your answers to make them even more impactful:

  1. Experience with languages:

    • "Yes, I have extensive experience with all of those languages. In my current role, I've frequently utilized SQL and Visual Basic for various tasks and projects."
  2. Database tools:

    • "Yes, I have experience designing and maintaining databases with MS Access and Excel. However, while they serve certain purposes, I believe for a more scalable and long-term solution, a SQL database would be preferable. That said, I'm adaptable and can work with whichever tools best suit the business needs."
  3. Automating and optimizing tasks:

    • "Absolutely. In my current role, I've often leveraged VB and SQL to enhance efficiency. For instance, I revamped a complex SQL stored procedure, transitioning from merging three subqueries to implementing a CTE. This not only streamlined the process but also made the code more readable and maintainable."
  4. Advisory roles:

    • "Certainly. In my current position, I frequently act as the IT liaison for our staff. I often assist with troubleshooting issues they encounter, and if it's something beyond my purview, I ensure it's escalated to our technical services department. Additionally, I provide training sessions on essential IT tasks, from connecting to network printers to mapping network drives."
  5. Documentation:

    • "Yes, documentation is essential. I've utilized various methods like word documents and HTML files, but I've found tools like OneNote to be especially effective. It allows for easy updating, contains links to essential resources, and supports multimedia like screenshots. Additionally, I've produced how-to video lessons for certain programs, which have been well-received."
  6. Budget-related tasks:

    • "Indeed, I'm responsible for procurement in my current department. I ensure that all our product and service requests align with state regulations, right from request to payment."
  7. Administrative duties:

    • "Absolutely. I once developed an Excel workbook specifically to streamline our time tracking and reporting process. As for policies and deadlines, I adhere strictly to departmental policies and have adopted an agile approach, using tools like a Scrum board, to manage tasks effectively."
  8. Adapting to new tools:

    • "I'm always keen to learn and adapt to new tools and methodologies. While I pick up new tools swiftly and often train others, I also use my experience to identify potential areas of improvement. If I feel a different tool or method could enhance our productivity, I'd certainly present a case for it, but always with the organization's best interests in mind."
  9. Communication skills:

    • "I frequently interact with non-technical professionals in my current role. This has honed my ability to translate technical concepts, like metadata or unique keys, into more accessible language. Whether it's advocating for the transition from Excel to SQL or explaining the benefits of SharePoint, I ensure my communication is clear and relatable."

Remember, interviews are as much about demonstrating your experience and skills as they are about showcasing your ability to communicate effectively and fit into the company's culture. Your revised answers give a clear and confident picture of your capabilities while also highlighting your adaptability and willingness to collaborate. Good luck with your interview!

USER

How do I tactfully ask about when they will make a decision? I really want to know how long to wait.

ASSISTANT

Absolutely, it's natural to be eager to know when a decision will be made, especially when you're excited about a potential role. Asking about the timeline for a decision is common and expected. The key is to ask in a manner that communicates your enthusiasm for the position without seeming impatient. Here are some tactful ways you can frame this question:

  1. Express Enthusiasm First:

    • "I'm really excited about the opportunity to contribute to [specific aspect of the job/company]. Could you provide some insight into the next steps and the expected timeline for a decision?"
  2. In the Context of Your Availability:

    • "To ensure I manage my calendar and other potential commitments, may I ask about the timeline you're anticipating for making a decision?"
  3. Curiosity about the Process:

    • "I'd love to understand more about the next steps in your hiring process. Do you have an estimated timeline for when you'll be making a decision?"
  4. General Inquiry:

    • "Thank you for taking the time to discuss this position with me. I was wondering, what does the timeline typically look like post-interview in terms of feedback or decisions?"
  5. Direct Approach (still tactful):

    • "I'm very interested in this role and want to ensure I stay proactive. Could you tell me when you anticipate making a decision?"

Remember, it's not just about what you ask but also how you ask. Keep your tone positive and understanding, recognizing that hiring decisions can involve several layers of discussion and consideration. And it's always a good idea to wrap up by thanking them for their time or for considering you, as it shows gratitude and maintains a positive connection.

USER

Can you give me a list of general interview questions usually asked in an interview? Perhaps not technical questions but other areas that they may ask about.

ASSISTANT

Certainly! Here are some general interview questions that are commonly asked:

  1. Introductory Questions:

    • Tell me about yourself.
    • How did you hear about this position?
  2. Experience & Background:

    • Can you explain the gaps in your work history?
    • Describe a challenge you've faced at work and how you dealt with it.
    • How does your previous experience prepare you for this role?
  3. Behavioral/Situational Questions:

    • Describe a time when you had to work with a difficult colleague. How did you handle it?
    • Can you provide an example of a project that did not go as planned and how you managed it?
    • Describe a situation where you went above and beyond for a customer or colleague.
  4. Motivational Questions:

    • Why do you want this job?
    • Why should we hire you?
    • Where do you see yourself in 5 years?
  5. Cultural Fit & Team Dynamics:

    • What kind of work environment do you thrive in?
    • Describe a time when you disagreed with a team member. How did you resolve it?
    • How do you handle feedback or criticism?
  6. Work Ethics & Problem Solving:

    • Describe a time when you had to handle a high-pressure situation.
    • How do you prioritize your tasks when faced with multiple deadlines?
    • Explain a situation where you had to solve a difficult problem. What did you do?
  7. Questions About the Company/Role:

    • What do you know about our company?
    • What interests you about this role?
    • Do you have any concerns about the job or the company?
  8. Questions on Adaptability & Growth:

    • How do you handle change in the workplace?
    • Can you describe a time when you had to learn a new tool or technology? How did you approach it?
    • How do you ensure continuous professional growth?
  9. Personal Qualities & Characteristics:

    • How would your previous coworkers describe you?
    • What are your greatest strengths and weaknesses?
    • What are you most proud of in your career?
  10. Closing Questions:

  • Do you have any questions for us?
  • What are your salary expectations?
  • When would you be available to start?

Remember, while it's beneficial to prepare for these questions, it's also essential to remain genuine in your responses. Interviewers appreciate authenticity, and rehearsed answers can sometimes come across as insincere. Use these questions as a guide to reflect on your experiences and formulate your unique responses.

USER

I'd like you to act as a job coach and help me flesh out some of the questions you provided. Help me figure out how to answer these questions. Let's start with the simple one "Tell me about yourself." How should I answer this?

ABOUT ME

Certainly! "Tell me about yourself" is one of the most common introductory questions in an interview, and it's your chance to provide a concise summary of your professional journey, highlighting key experiences, skills, and attributes that make you suitable for the job. Here's a general structure that you can follow, along with some guiding points:

1. Start with your current or most recent role:

  • Job title, responsibilities, and achievements.
  • Emphasize any skills or tasks you've handled that align with the new job's requirements.

2. Highlight past experiences:

  • Briefly touch on relevant past roles.
  • Share significant achievements or unique challenges you've overcome.
  • Mention any transitions in your career and the reasons for them (e.g., pursuing a new challenge, a growing interest in a different aspect of your field).

3. Discuss education and certifications:

  • Where you studied, what you studied, and any relevant honors or extracurriculars.
  • Additional certifications or courses that have helped you in your professional journey.

4. Share a bit about your professional interests and aspirations:

  • This can be related to the industry, a particular skill you're passionate about, or your broader career goals.

5. Wrap up with personal attributes or soft skills:

  • Discuss attributes that make you a good fit for the role and the company culture.
  • This can include teamwork, adaptability, leadership, or any other soft skill you deem relevant.

Example Response:

"I'm currently a [Your Current Role] at [Your Current Company], where I've been for the past [X years]. In this role, I've had the chance to [a significant achievement or responsibility, e.g., "optimize our database systems and lead a small team on various projects"]. Before that, I worked at [Previous Company], where I [Brief overview of significant tasks or achievements]. I earned my degree in [Your Degree] from [Your University], and I've also taken additional courses in [Specific Courses/Certifications relevant to the job]. Professionally, I'm very passionate about [Specific Interest, e.g., "finding efficient solutions to data management challenges"], and I'm eager to bring that passion to a role like this. On a personal note, I pride myself on being [Specific Attribute, e.g., "adaptable and a great team player"], which I believe aligns well with this position and the company's values."

I'm currently at Dept of State Hospitals - Napa, where I've been for the past 10 years. In this role I've had the chance to work a lot with Visual Basic, Excel and SQL to create reports that track our patients treatment. Before that I worked at the county in Procurement and helped procure both products and services. I earned my degree in Healthcare Administration from UOP. With 18 additional units in IT where I learned programming, networking and systems admin. Professionally I"m very passionate about analyzing data and helping people understand issues better with data and presenting solutions in a meaningful way. On a personal note, I pride myself on being very reliable.

Remember to tailor this structure to your experiences and the specific job you're applying for. It's essential to strike a balance between providing relevant details and keeping your answer concise and engaging.

To automate the process of moving files from a source directory to subdirectories based on the first letter of the last name, you can use a script. Here's a Bash script that should help you accomplish this task:

#!/bin/bash

# Source directory where the patient files are located
src_dir="/path/to/source_directory"

# Destination directory where subdirectories will be created
dest_dir="/path/to/destination_directory"

# Loop through each file in the source directory
for file in "$src_dir"/*; do
    # Check if it's a regular file
    if [[ -f "$file" ]]; then
        # Extract the last name from the file name
        last_name=$(basename "$file" | cut -d ',' -f 1 | tr -d '[:space:]')

        # Get the first letter of the last name
        first_letter="${last_name:0:1}"

        # Create the subdirectory if it doesn't exist
        sub_dir="$dest_dir/$first_letter"
        mkdir -p "$sub_dir"

        # Move the file to the corresponding subdirectory
        mv "$file" "$sub_dir/"
    fi
done

Here's how this script works:

  1. Replace /path/to/source_directory with the path to the directory where your patient files are located.

  2. Replace /path/to/destination_directory with the path to the directory where you want to move the files into subdirectories based on the first letter of the last name.

  3. The script loops through each file in the source directory.

  4. For each file, it extracts the last name by splitting the file name using a comma as a delimiter and removing any spaces.

  5. It then extracts the first letter of the last name.

  6. It creates a subdirectory in the destination directory with the name of the first letter if it doesn't already exist using mkdir -p.

  7. Finally, it moves the file to the corresponding subdirectory.

Make sure to save this script to a file (e.g., move_files.sh), make it executable using chmod +x move_files.sh, and then run it. It will process all files in the source directory and move them to the appropriate subdirectories in the destination directory based on the first letter of the last name.

Sub CreateDirectory()
Dim rootPath As String
Dim dirPath As String
Dim fullPath As String
Dim selectedRange As Range
' Ask for the root directory path
On Error Resume Next
Set selectedRange = Application.InputBox("Select a cell for the root directory path:", Type:=8)
On Error GoTo 0
If selectedRange Is Nothing Then Exit Sub
rootPath = selectedRange.Value
If Len(Dir(rootPath, vbDirectory)) = 0 Then
MsgBox "The specified root directory does not exist.", vbCritical
Exit Sub
End If
Do
' Ask for the directory path to create
On Error Resume Next
Set selectedRange = Application.InputBox("Select a cell for the directory path to create:", Type:=8)
On Error GoTo 0
If selectedRange Is Nothing Then Exit Do
dirPath = selectedRange.Value
fullPath = rootPath & "\" & dirPath
If Len(Dir(fullPath, vbDirectory)) = 0 Then
MkDir fullPath
MsgBox "Directory created: " & fullPath, vbInformation
Else
MsgBox "Path already exists: " & fullPath, vbExclamation
End If
Loop
End Sub
# Before we can delete, move, or copy things...we need things! It's time to get some more practice using `touch` and `mkdir`
#
# Please create a new directory somewhere on your machine called `Bootcamp`. Inside of it, create the the folders and files indicated below:
# - Sadly `Edgar` had to drop out of the course. Delete the `Edgar.txt` file in `FallCohort`
# - This means we now have space in our Fall Cohort to move someone off of the waitlist. Please move `Netta.txt` from the `Waitlist` folder into the `FallCohort` folder.
# - Please delete the `Waitlist` folder and its contents
# - It turns out that I misspelled Sara. She spells her name "Sarah" with an "h" at the end. Please rename the `Sara.txt` file to `Sarah.txt`
# - Unfortunately Italo is having a bit of a personal emergency, and he would like to move to our WinterCohort. Please move the `Italo.txt` file from `FallCohort` to the `WinterCohort` folder
# - Oh no, our entire Winter Cohort had to be cancelled because of a worldwide pandemic :( We decided to bump all of the scheduled winter students to spring. In the `Bootcamp` directory create a copy of the `WinterCohort` folder called `SpringCohort`
# - Please rename the WinterCohort folder to `WinterCohortCANCELLED`
# - Oh no! We're going out of business. Please delete the entire `Bootcamp` directory 😢
# Before we can delete, move, or copy things...we need things! It's time to get some more practice using `touch` and `mkdir`
#
# Please create a new directory somewhere on your machine called `Bootcamp`. Inside of it, create the the folders and files indicated below:
mkdir Bootcamp
cd Bootcamp
mkdir FallCohort WinterCohort
cd FallCohort
touch Italo.txt
touch Edgar.txt
touch Linus.txt
touch Sara.txt
touch Silvio.txt
mkdir Waitlist
cd Waitlist
touch Hanna.txt
touch Haris.txt
touch Netta.txt
cd ..
cd WinterCohort
touch Santiago.txt
touch Iris.txt
touch Naomi.txt
cd ..
tree
# .
# ├── FallCohort
# │ ├── Edgar.txt
# │ ├── Iris.txt
# │ ├── Italo.txt
# │ ├── Linus.txt
# │ ├── Naomi.txt
# │ ├── Santiago.txt
# │ ├── Sara.txt
# │ ├── Silvio.txt
# │ └── Waitlist
# │ ├── Hanna.txt
# │ ├── Haris.txt
# │ └── Netta.txt
# └── WinterCohort
#
# Note some files need to be moved
cd FallCohort
mv Santiago.txt Iris.txt Naomi.txt ~/repos/3998050/Bootcamp/WinterCohort/
tree
# ▶ tree
# .
# ├── FallCohort
# │ ├── Edgar.txt
# │ ├── Italo.txt
# │ ├── Linus.txt
# │ ├── Sara.txt
# │ ├── Silvio.txt
# │ └── Waitlist
# │ ├── Hanna.txt
# │ ├── Haris.txt
# │ └── Netta.txt
# └── WinterCohort
# ├── Iris.txt
# ├── Naomi.txt
# └── Santiago.txt
# Sadly Edgar had to drop out of the course. Delete the Edgar.txt file in FallCohort
rm FallCohort/Edgar.txt
tree
# This means we now have space in our Fall Cohort to move someone off of the waitlist. Please move Netta.txt from the Waitlist folder into the FallCohort folder.
clear
mv FallCohort/Waitlist/Netta.txt FallCohort/
tree
# ▶ tree
# .
# ├── FallCohort
# │ ├── Italo.txt
# │ ├── Linus.txt
# │ ├── Netta.txt
# │ ├── Sara.txt
# │ ├── Silvio.txt
# │ └── Waitlist
# │ ├── Hanna.txt
# │ └── Haris.txt
# └── WinterCohort
# ├── Iris.txt
# ├── Naomi.txt
# └── Santiago.txt
#
# log_file.py - Version 1.4.0
import os
import logging
from datetime import datetime
import xlwings as xw
# Configure basic logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)
class FileProcessor:
"""
A class to process files and log their details in an Excel sheet. It tracks the duration files
remain in a specified directory and updates this information in the Excel sheet.
Parameters:
- approved_directory: Directory to scan for files.
- file_extensions: List of file extensions to consider.
- workbook_path: Full path to the Excel workbook.
- workbook_name: Name of the Excel workbook.
- sheet_name: Name of the sheet in the workbook where data is logged.
"""
def __init__(self, approved_directory, file_extensions, workbook_path, workbook_name, sheet_name):
self.approved_directory = approved_directory
self.file_extensions = file_extensions
self.workbook = xw.Book(workbook_path)
self.sheet = self.workbook.sheets[sheet_name]
def get_last_row_of_table(self, table_name):
# Get the last row number of the specified table in Excel
try:
table = self.sheet.api.ListObjects(table_name)
return table.DataBodyRange.Rows.Count + table.DataBodyRange.Row if table and table.DataBodyRange else 0
except Exception as e:
logger.error(f'Error in getting last row of table "{table_name}": {e}')
return None
def find_files(self):
# Find and yield file paths in the approved_directory with specified extensions
logger.info(f'Searching for files in {self.approved_directory} with extensions: {self.file_extensions}')
for root, _, files in os.walk(self.approved_directory):
for file in files:
if file.split('.')[-1].lower() in self.file_extensions and '~' not in file:
yield os.path.join(root, file)
def open_workbook(self):
# Open the Excel workbook and return the sheet object
logger.info(f'Opening Excel workbook at path: {self.workbook.fullname}')
return self.workbook.sheets[self.sheet_name]
def read_existing_records(self, sheet):
# Read existing records from the Excel sheet and map them by filename
records = {}
try:
table = sheet.api.ListObjects('FileLogTable')
if table.DataBodyRange:
for row in table.DataBodyRange.Rows:
filename = row.Cells(1, 3).Value # Assuming filename is in the third column
if filename:
records[filename] = [cell.Value for cell in row.Cells]
except Exception as e:
logger.error(f'Error reading existing records: {e}')
return records
def write_records(self, sheet, records):
# Write updated records to the Excel sheet
try:
next_row = self.get_last_row_of_table('FileLogTable') + 1
for record in records.values():
row_range = f'A{next_row}:{chr(64 + len(record))}{next_row}'
sheet.range(row_range).value = record
next_row += 1
table = sheet.api.ListObjects('FileLogTable')
table.Resize(table.Range.Resize[next_row - 1])
except Exception as e:
logger.error(f'Error writing records to the Excel sheet : {e}')
def process_files(self):
# Main method to process files and update records
sheet = self.open_workbook()
current_records = self.read_existing_records(sheet)
for file_path in self.find_files():
parts = file_path.rsplit('\\', 2)
subfolder, filename = (parts[-2], parts[-1]) if len(parts) >= 3 else ('', parts[-1])
record = current_records.get(filename)
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
duration = self.calculate_duration(record[0]) if record else '0'
current_records[filename] = [timestamp, subfolder, filename, 'TRUE' if not record else 'FALSE', duration]
self.write_records(sheet, current_records)
logger.info("File processing completed.")
def calculate_duration(self, timestamp):
# Calculate duration since the timestamp
start_time = datetime.strptime(timestamp, "%Y-%m-%d %H:%M:%S")
return str(datetime.now() - start_time)
if __name__ == "__main__":
# Sample configuration for standalone execution
config = {
'approved_directory': '\\\\Mhnfs1\\cdo\\Court Reports\\Review\\Approved- FS USE ONLY\\',
'file_extensions': ['docx', 'doc'],
'workbook_path': 'C:\\Users\\blundeen\\AppData\\Local\\Apps\\repos\\file_timestamp\\log_file\\log_file.xlsm',
'workbook_name': "log_file.xlsm",
'sheet_name': 'file_log'
}
processor = FileProcessor(**config)
processor.process_files()
let
Source_Named_Range = Excel.CurrentWorkbook(){[Name = "pivot_myData"]}[Content],
Removed_top_3_rows = Table.Skip(Source_Named_Range, 2),
Removed_other_columns = Table.SelectColumns(
Removed_top_3_rows,
{
"Column1",
"Column2",
"Column3",
"Column4"
}
),
First_row_headers = Table.PromoteHeaders(Removed_other_columns, [PromoteAllScalars = true]),
visit_as_date = Table.TransformColumnTypes(
First_row_headers,
{
{"patient_number", type text},
{"full_name", type text},
{"provider", type text},
{"most_recent_visit", type date}
}
),
Remove_blank_visit = Table.SelectRows(
visit_as_date, each ([most_recent_visit] <> null) and ([patient_number] <> "(blank)")
),
// Sort most recent visit descending order & place inside Table.Buffer
Buffer_table = Table.Buffer(Table.Sort(Remove_blank_visit, {{"most_recent_visit", Order.Descending}})),
Remove_duplicate_name_id = Table.Distinct(Buffer_table, {"patient_number", "full_name"}),
Sort_name_asc = Table.Sort(Remove_duplicate_name_id, {{"full_name", Order.Ascending}})
in
Sort_name_asc
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#include <Misc.au3>
; #INDEX# =======================================================================================================================
; Title .........: startup_menu.au3
; AutoIt Version : 3.3.14.5
; Language ......: English
; Description ...: A GUI script for selecting and launching applications and folders at startup.
; Author(s) .....: lundeen-bryan
; Precondition(s): Must have an INI file in the ScriptDir named startup_menu.ini (see instructions file)
; ===============================================================================================================================
; #CURRENT# =====================================================================================================================
; Terminate
; HandleSelectedItems
; ExecuteItemAction
; LoadAppsFromINIFile
; StartAppAndWaitWithRunWait
; WaitForWindowAndActivate
; OpenAndResizeFolder
; ===============================================================================================================================
; #INTERNAL_USE_ONLY#============================================================================================================
; [List any internal functions or helpers here if applicable]
; ===============================================================================================================================
; #FUNCTION# ====================================================================================================================
; Author ........: lundeen-bryan
; Modified.......: [List any modifications or contributors if applicable]
; ===============================================================================================================================
#Region---------Hotkeys
HotKeySet("{ESC}", "Terminate")
#EndRegion
#Region ### START Koda GUI section ### Form=C:\Users\lunde\repos\AutoIT\startup_menu.kxf
$startup_menu = GUICreate("Bryan's Startup Menu", 583, 296, 192, 124)
GUISetFont(12, 400, 0, "Lucida Fax")
GUISetBkColor(0xFFFFFF)
$Group1 = GUICtrlCreateGroup("Choose Which Options Below You Want To Start:", 24, 16, 441, 241)
GUICtrlSetColor(-1, 0x464646)
$Apps_List = GUICtrlCreateList("", 40, 56, 409, 186, BitOR($LBS_STANDARD, $LBS_MULTIPLESEL))
GUICtrlSetData(-1, "") ; Clear any existing data
; Load data from INI file to the Listbox
LoadAppsFromINIFile()
GUICtrlCreateGroup("", -99, -99, 1, 1)
$OK_Button = GUICtrlCreateButton("OK", 496, 40, 75, 25)
GUICtrlSetColor(-1, 0x464646)
GUICtrlSetCursor(-1, 0)
$StatusBar1 = _GUICtrlStatusBar_Create($startup_menu)
Dim $StatusBar1_PartsWidth[3] = [10, 360, -1]
_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)
_GUICtrlStatusBar_SetText($StatusBar1, "", 0)
_GUICtrlStatusBar_SetText($StatusBar1, "Status", 1)
_GUICtrlStatusBar_SetText($StatusBar1, "Time", 2)
_GUICtrlStatusBar_SetBkColor($StatusBar1, 0xF9F4EE)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ## #
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $OK_Button
ConsoleWrite("Ok button was pressed..." & @CRLF)
HandleSelectedItems()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func Terminate()
Exit
EndFunc ;==>Terminate
Func HandleSelectedItems()
ConsoleWrite("Running HandleSelectedItems..." & @CRLF)
Local $selectedItems = ""
For $i = 0 To _GUICtrlListBox_GetCount($Apps_List) - 1
If _GUICtrlListBox_GetSel($Apps_List, $i) Then
$selectedItem = _GUICtrlListBox_GetText($Apps_List, $i)
$selectedItems &= $selectedItem & @CRLF
ConsoleWrite("The selected item is a " & $selectedItem & @CRLF)
ExecuteItemAction($selectedItem)
EndIf
Next
If $selectedItems <> "" Then
ConsoleWrite("You selected the following items:" & $selectedItems & @CRLF)
Else
ConsoleWrite("No items selected in the Listbox." & @CRLF)
EndIf
TrayTip("Finished!", "Finished Starup Items", 3)
Sleep(3000)
Exit
EndFunc
Func ExecuteItemAction($item)
ConsoleWrite("Running ExecuteItemAction..." & @CRLF)
Local $iniFile = @ScriptDir & "\startup_menu.ini"
Local $itemType = IniRead($iniFile, "TYPE", $item, "")
Local $itemPosition = IniRead($iniFile, "POSITION", $item, "")
If $itemType = "app" Then
StartAppAndWaitWithRunWait($item, $itemPosition = "show")
ConsoleWrite($item & " is an app." & @CRLF)
ElseIf $itemType = "folder" Then
OpenAndResizeFolder($item, $itemPosition)
ConsoleWrite($item & " is folder." & @CRLF)
Else
ConsoleWrite("The type of '" & $item & "' is not recognized.")
EndIf
EndFunc
Func LoadAppsFromINIFile()
Local $iniFile = @ScriptDir & "\startup_menu.ini"
Local $appSettings = IniReadSection($iniFile, "PATH")
If @error Then
ConsoleWrite("Failed to read settings from INI file.")
Return
EndIf
; Populate the Listbox with pseudonames
For $i = 1 To $appSettings[0][0]
GUICtrlSetData($Apps_List, $appSettings[$i][0])
Next
EndFunc
Func StartAppAndWaitWithRunWait($appKey, $showApp = False)
ConsoleWrite("Running StartAppAndWaitWithRunWait..." & @CRLF)
; Read the path to the application from the INI file
Local $iniFile = @ScriptDir & "\startup_menu.ini"
Local $appPath = IniRead($iniFile, "PATH", $appKey, "")
; Check if the path is empty or not found in the INI file
If $appPath = "" Then
ConsoleWrite("Application path not found for key: " & $appKey & @CRLF)
Return
EndIf
Local $flags = @SW_MINIMIZE
If $showApp Then
$flags = @SW_MAXIMIZE
EndIf
;~ Parameters are: `Run ( "program" [, "workingdir" [, show_flag [, opt_flag]]] )`
Local $result = Run($appPath, @WorkingDir, $flags, $STDOUT_CHILD + $STDERR_CHILD)
; Check the result of Run for errors
If $result <> 0 Then
; Application started successfully and exited with code 0
ConsoleWrite("The application " & $appKey & " has completed successfully." & @CRLF)
ElseIf @error Then
; RunWait encountered an error
ConsoleWrite("Error while starting the application (" & $appKey & "): " & @error & @CRLF)
Else
; Application exited with a non-zero exit code
ConsoleWrite("The application (" & $appKey & ") started successfully, but it encountered an error or issue during its execution." & @CRLF)
EndIf
Sleep(2000) ;~ wait a couple seconds for app to load
EndFunc
Func OpenAndResizeFolder($folderKey, $side)
ConsoleWrite("Running OpenAndResizeFolder..." & @CRLF)
; Read the path and screen number for the folder from the INI file
Local $iniFile = @ScriptDir & "\startup_menu.ini"
Local $folderPath = IniRead($iniFile, "PATH", $folderKey, "")
Local $screenNum = IniRead($iniFile, "SCREEN", $folderKey, 1) ; Default to screen 1 if not specified
; Check if the path is empty or not found in the INI file
If $folderPath = "" Then
ConsoleWrite("Folder path not found for key: " & $folderKey & @CRLF)
Return
EndIf
; Open the specified folder/app
ShellExecute($folderPath)
; Wait for a moment to allow the window to open
Sleep(1000)
; Activate the window
WinActivate("[ACTIVE]")
; Position the window based on the screen number
If $screenNum = 2 Then
; Move to the second screen
Send("#+{RIGHT}") ; Windows key + Shift + Right Arrow
EndIf
; Adjust position on the screen based on the $side parameter
If $side = "RIGHT" Then
Send("#{RIGHT}") ; Windows key + Right Arrow
Else
Send("#{LEFT}") ; Windows key + Left Arrow
EndIf
ConsoleWrite("Window for '" & $folderKey & "' positioned on screen " & $screenNum & " at " & $side & "." & @CRLF)
EndFunc
<!DOCTYPE html>
<html>
<head>
<title>Startup Menu Configuration</title>
</head>
<body>
<h2>Instructions for Configuring the <code>startup_menu.ini</code> File</h2>
<h3>Overview</h3>
<p>The <code>startup_menu.ini</code> file is used to configure the AutoIt script, determining which applications and folders are listed in the program, how they are handled, and their display preferences.</p>
<h3>Structure of the INI File</h3>
<p>The INI file is divided into three sections:</p>
<ol>
<li><strong>[PATH]</strong> - Specifies the paths to applications and folders.</li>
<li><strong>[TYPE]</strong> - Defines whether each item is an 'app' or a 'folder'.</li>
<li><strong>[POSITION]</strong> - Indicates the position for folders ('left' or 'right') and the state for apps ('show' or 'hide').</li>
</ol>
<h3>Editing Instructions</h3>
<p><strong>1. Open the INI File:</strong> Use a text editor like Notepad to open the <code>startup_menu.ini</code> file.</p>
<p><strong>2. [PATH] Section:</strong></p>
<ul>
<li>Format: <code>&lt;name&gt;=&lt;path&gt;</code></li>
<li>Add each application or folder you want to include in the list.</li>
<li>Example:
<pre><code>[PATH]
typertask=C:\Path\To\TypeTask.exe
documents=C:\Users\YourName\Documents</code></pre>
</li>
<li>Replace the example paths with the actual paths to your applications and folders.</li>
</ul>
<p><strong>3. [TYPE] Section:</strong></p>
<ul>
<li>Format: <code>&lt;name&gt;=app</code> or <code>&lt;name&gt;=folder</code></li>
<li>Specify if the item is an application (app) or a folder (folder).</li>
<li>Example:
<pre><code>[TYPE]
typertask=app
documents=folder</code></pre>
</li>
<li>Use the same <code>&lt;name&gt;</code> as in the [PATH] section.</li>
</ul>
<p><strong>4. [POSITION] Section:</strong></p>
<ul>
<li>For Apps: Format: <code>&lt;name&gt;=show</code> or <code>&lt;name&gt;=hide</code></li>
<li>For Folders: Format: <code>&lt;name&gt;=left</code> or <code>&lt;name&gt;=right</code></li>
<li>Specify the position for folders (left or right) and the visibility for apps (show or hide).</li>
<li>Example:
<pre><code>[POSITION]
documents=left
typertask=hide</code></pre>
</li>
<li>Again, use the same <code>&lt;name&gt;</code> as in the [PATH] section.</li>
</ul>
<p><strong>5. Save the INI File:</strong> After making changes, save the file.</p>
<h3>Additional Tips</h3>
<ul>
<li>Ensure the paths are correct and accessible on your system.</li>
<li>The names used across the sections must be consistent.</li>
<li>Paths to applications should be to the executable files (.exe).</li>
<li>For folders, use standard file paths.</li>
</ul>
<h3>Testing</h3>
<p>After configuring the INI file, run the AutoIt script to test your settings. Ensure that the applications and folders appear in the list and behave as expected when selected.</p>
<h3>Example INI File</h3>
<pre><code>
[PATH]
typertask=C:\Path\To\TypeTask.exe
documents=C:\Users\YourName\Documents
downloads=C:\Users\YourName\Downloads
[TYPE]
typertask=app
documents=folder
downloads=folder
[POSITION]
typertask=hide
documents=left
downloads=right
</code></pre>
<p>This example shows how the INI file should be structured. Replace the paths and names with those relevant to your setup.</p>
</body>
</html>
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment