Search found 35 matches

by TokyoMike
Mar 11th, ’23, 07:22
Forum: User Commands and Scripts
Topic: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter
Replies: 8
Views: 5881

Re: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter

Also - have you seen the app aText? It lets you paste in scripts or various languages and as long as you point it at the right compiler in the settings it runs the script and gives you the output. Would be an awesome feature for Fastkeys.
by TokyoMike
Mar 11th, ’23, 07:18
Forum: User Commands and Scripts
Topic: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter
Replies: 8
Views: 5881

Re: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter

I’ve not had a lot of luck compiling Python into an exe and then running it.

Could you point me in the right direction to make sure I am compiling it correctly and calling it correctly?
by TokyoMike
Feb 27th, ’23, 00:14
Forum: User Commands and Scripts
Topic: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter
Replies: 8
Views: 5881

Re: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter

Thank you! Test case: today, 2023-2-27 is FY23 Q2 W9 Test case: 2023-10-1 is FY24 Q1 W1 from datetime import date, datetime, timedelta import typing from dateutil import relativedelta FY_START_MONTH = 10 Q_MAP = [2, 3, 4, 1] # Define a "delta" object that represents the time from a given d...
by TokyoMike
Feb 25th, ’23, 04:50
Forum: User Commands and Scripts
Topic: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter
Replies: 8
Views: 5881

Re: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter

After some tinkering and testing I can confirm that the Quarter works great. The weeks are also "shifted" - but for the YEAR not the week in the quarter.
by TokyoMike
Feb 25th, ’23, 04:42
Forum: User Commands and Scripts
Topic: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter
Replies: 8
Views: 5881

Re: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter

Thanks! This seems to work. Let me see if I have the logic: Quarters: you are shifting them one quarter out in the q array, so Jan/Feb/Mar instead of Q1 is shifted to Q2, and so on. Weeks: you are shifting these manually in the same fashion shifting a number of days out - an entire quarter out. Now ...
by TokyoMike
Feb 23rd, ’23, 03:42
Forum: User Commands and Scripts
Topic: Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter
Replies: 8
Views: 5881

Fiscal Year, Fiscal Quarter, Week in Fiscal Quarter

Hi - I was previously using aText which lets you run Python scripts natively. My company has locked down out machines and aText will no longer update - I think because it comes from the Microsoft Store. Fastkeys, on the other hand, is my savior and I am glad to come back to it. I am hoping you can h...
by TokyoMike
Aug 20th, ’22, 05:17
Forum: User Commands and Scripts
Topic: Text Expander: use python script to fetch info from the internet
Replies: 6
Views: 5871

Re: Text Expander: use python script to fetch info from the internet

I've come back to Fastkeys after some time, and I'd like some help getting a Python script working. I compiled the script to an .exe but executing with Fastkeys does nothing but briefly open and close a command prompt windows. If I run the .exe in a command window directly the text I am getting from...
by TokyoMike
Jan 18th, ’22, 23:25
Forum: User Commands and Scripts
Topic: Text Expander: use python script to fetch info from the internet
Replies: 6
Views: 5871

Re: Text Expander: use python script to fetch info from the internet

Marko wrote: Jan 18th, ’22, 06:28 You cannot use the Python code in FastKeys directly. You need to compile the code to exe and then run in.
Doh - thanks - I missed that. This will work in cases where I don’t need to feed the code with an input.

Thanks!
by TokyoMike
Jan 18th, ’22, 05:48
Forum: User Commands and Scripts
Topic: Text Expander: use python script to fetch info from the internet
Replies: 6
Views: 5871

Re: Text Expander: use python script to fetch info from the internet

Hi - I have tried three methods, both have failed. 1. I entered the python script into the text area for TextExpander > Run -- Result: a web page opened with the raw unprocessed json string that my script fetches. I had hoped to see the parsed string. 2. I pointed to a file. Result: the .py file was...
by TokyoMike
Jan 16th, ’22, 01:55
Forum: User Commands and Scripts
Topic: Text Expander: use python script to fetch info from the internet
Replies: 6
Views: 5871

Text Expander: use python script to fetch info from the internet

Hi - I am wondering if it is possible to call a Python script as a text expansion replacement to fetch information from the web. As an example - I would like to type :pq and have a python script fetch a quote from the internet and replace the trigger with that quote: Type :pq and get: The things tha...