Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
pseudorandom
Jun 16, 2010



Yam Slacker

Chunjee posted:

This kindof thread just doesn't seem to live well on SA these days. Looking for a new home that can be referenced in the OP or a megathread.


Are you saying you need some kind of tiny app that can let people request tiny apps?

Adbot
ADBOT LOVES YOU

pseudorandom
Jun 16, 2010



Yam Slacker

The_White_Crane posted:

Humble Request:
A program that can run in the background which replaces the windows mouse cursor with another image when it's over a specific program window.

Problem:
I'm emulating PS2 lightgun games with a wiimote and it's not accurate enough to work without some kind of crosshair, and the windows mouse cursor is too small to easily see from the distance I'm playing at.

Description and requirements:
I need something which I can feed two things: 1) an image file of some sort (with transparency) and 2) an executable file location, which will then display the image file at the mouse cursor location only when the cursor is over a window of the specified executable.

Nice to have features:
Ideally it would also hide the native windows arrow cursor and be able to support multiple executables as targets.

I feel like this might already exist, but it's impossible to search for because you just get 50,000 pages explaining how to change the default windows cursor. :sigh:


I'm working on this. I've managed to get the cursor to change, and to sort of detect the window under the cursor. Strangely it only seems to be reading the window some of the time, so I may need to see if I can extract the cursor position reading into a separate thread.

If anyone else feels like taking this on, don't let me discourage you, as I'm estimating my likelihood of finishing to be about 30% right now. Plus I'll be out of town for the weekend and won't be able to work on it.



Edit: Yes, pulling the window query to a different thread works.

pseudorandom fucked around with this message at 03:44 on Apr 12, 2019

pseudorandom
Jun 16, 2010



Yam Slacker
You've already found a solution, but I did end up finishing mine, so I'm going to share it anyway, even though it's nothing special.

Request Fill
Name: Super cool cursor changer
Download link: Github
Source Code: Github Repo
Features and Usage: Changes your cursor for applications. See my hastily composed Configuration docs.
Screenshot:
+

pseudorandom
Jun 16, 2010



Yam Slacker

Shlomo Palestein posted:

Yeah, the more I think of it, the more kinda difficult this all becomes. I think it's just hard for me to wrap my head around where certain more abstracted things would come from - like: if I say MONDAY is the day I care about, I can check a calendar for the last X mondays within a range, which also requires me to be aware of where we are in the month so I can pop back a month (or more) if need be. So that's a whole thing, just to find the month and date. The rest is somewhat easier in terms of formatting the link, since we'd just sort of do a while loop from the start time to the end time, but that date is the real sticky bit.

My idea of an individual text file is purely out of my own familiarity with how that sort of thing works. That is: you read the text file until a specific delimiter, save that as variable DAY, read until the next delimiter, save that as START, next END, next NAME, then have a predetermined end-of-line character just to populate everything so the above algorithm can be applied. Once the downloading and renaming is done, check to see if there's another line and do it all over again if there is. I'm sure there's probably an easier way (even like, simple input might not be bad: just ask for each value, process everything, and return to asking each value once the process is done downloading). It's absolutely not set in stone.

I feel like I'm asking for a sort of big pain in the butt here, so if that's at all the case, please don't worry yourself too much with it.

I'm also totally open for this batch file idea if that's just far less of a pain. I can just edit in date/time ranges if that makes more sense (and since only the former is likely to change all that often, it wouldn't even be that time intensive).

Honestly, I think this is still a relatively easy request, especially for a basic implementation without too many features. I could definitely make something like this, but I'm a bit busy this week and leaving for a vacation next week, so I probably won't be able to do this for a couple weeks.

That said, this still seems like a pretty simple task, so I assume someone else will get it done before then.

pseudorandom
Jun 16, 2010



Yam Slacker

Shlomo Palestein posted:

Thanks for looking into this, everyone. I realize it's sort of the equivalent of just showing up at a stranger's house and asking them to make you a pie. :)

It's just like that, except many of these strangers really enjoy making pie, or are new to pie making and are looking for excuses to make pies to help them practice. :buddy:

pseudorandom
Jun 16, 2010



Yam Slacker

mobby_6kl posted:

Haha I've had this on my mind every time I bought something on eBay. Never got to actually do it, but if eBay has a search Ali it shouldnt be too difficult. No promises though, I'm pretty busy this week :(


It looks like this API might exist. I'm already working on a few other personal projects at the moment, so I don't have spare time for this; however, if this isn't fulfilled in a month or two, bump the thread and maybe I'll take a stab at it.

pseudorandom
Jun 16, 2010



Yam Slacker

Sri.Theo posted:

Hi all, a bit of a weird one here. Someone called Tom Forth (@thomasforth) recently published this tool called parkulator which calculates the amount of land area used for car parks in an area, it's a really useful tool if you're interested in urban design, affordable housing or economics.

Unfortunately it doesn't calculate the amount of land used for on street parking as that's marked differently on Open Street maps. My first instinct was to mark out the areas I care about as shapes on Open Street map but it seems like that's not how they want to do it.

He has posted the source on GitHub and said others are welcome to submit changes.

Is it possible to amend the current code to also pull the data for on street parking as well?


It sounds like he's using existing software and isn't using his own code.

quote:

Method

This tool uses osmconvert, osmfilter, and raw open street map downloads from Geofabrik. As such all data is Copyright of The Open Street Contributors.

I do six things,

  1. Download an osm.pbf file from Geofabrik (I picked Great Britain but this method will work for anywhere). Extraction date was 2019-05-10. The process will need re-running to include updates to OSM.
  2. Convert it from pbf to o5m format using osmconvert great-britain-latest.osm.pbf -o=great-britain-latest.osm.o5m.
  3. Use osmfilter to extract "amenity=parking" tags only using osmfilter great-britain-latest.osm.o5m --keep="amenity=parking" -o=great-britain-parking.osm.
  4. Load the osm file into QGIS and resave as GEOJSON.
  5. Download The OECD functional economic area shapefile for the UK and select my eight cities of interest.
  6. Use the clip function in QGIS to retain only the parking in those cities. A full file of all parking Great Britain is also provided. Both are exported in GEOJSON format and available for download in this repository.

You can download the referenced software, duplicate the process for your own locality, and then all you need to change is step 6. I don't know QGIS myself, but I would assume this is just a matter of changing some filter value for the clip function.

pseudorandom
Jun 16, 2010



Yam Slacker

tactlessbastard posted:

Ok, I'm back at work. The first .csv which I ran on 10 emails as I tested the limits of the script (10 emails, 50 emails, 100, 500, 1000, 2000, etc.) Never ran into a show stopping limit before running out of emails to parse.

Anyway, that .csv with 10 emails is 6kb.

If I open them with notepad it shows the whole contents of the email. (Names deleted)

I believe the $email.Body property is returning the cleartext body (without HTML) if I'm understanding the docs correctly. Since the current regex is looking for an HTML tag, I think you might be able to edit it to just look for whitespace (and new lines). I think this will work as long as the Machine Name and Line Number do not have spaces in them.

code:
$mailbox = 'yourname@company.com'
$searchphrase = '^ALERT - Timer'
$outfile = "C:\tmp\timer_alerts_$(get-date -UFormat “%Y_%m_%d_%H_%M_%S”).csv"

$outlook = New-Object -comobject Outlook.Application
$namespace = $outlook.GetNameSpace("MAPI")
$store = $namespace.Stores[$mailbox]
$inbox = $store.GetDefaultFolder([Microsoft.Office.Interop.Outlook.OlDefaultFolders]::olFolderInbox)
$root = $store.GetRootFolder()

$data = @()

Foreach ($email in $inbox.Items) {
    if($email.Subject -match $searchphrase) {
        $payload = @{ Time = ""; Machine = ""; Line = ""}
        if($email.Body -match "Machine Name: ([^<\s\r\n]*)") {
            $payload.Machine = $matches.1
        }
        if($email.Body -match "Line Number: ([^<\s\r\n]*)") {
            $payload.Line = $matches.1
        }
        $payload.Time = $email.SentOn | Get-Date -UFormat "%m/%d/%Y %R"

        $data += $payload
    }
}

$data | % {New-Object psobject -Property $_ } | Export-CSV $outfile -NoTypeInformation

pseudorandom
Jun 16, 2010



Yam Slacker

fatman1683 posted:

I'm not sure if this qualifies as a 'tiny app', but I'm not finding any commercial software that just does this thing, so maybe someone here can put something together, or knows of an existing piece of software that will do it:

I need to schedule blocks of time for different events. I know how long each event takes, and what I'd really like is some kind of drag-and-drop calendar situation so I can arrange the schedule. Events range in duration from 2-20 hours or so, and need to be able to roll over between days on the calendar. I also need the ability to schedule on an arbitrary number of multiple parallel tracks.

Some nice-to-have features would be:
The ability to define some stock events and drag and drop copies of them onto the schedule.
Configurable constraints on when a particular predefined event can be scheduled, i.e. must start after/end before x time, cannot start less than x minutes before/after another copy of the same event
Configurable constraints on how many copies of a particular predefined event can be scheduled to start on a given day

The pipe-dream feature would be a function that optimizes the schedule based on the above constraints, but I'm pretty sure that's unrealistic for anything less than ERP software or something similar.

Anyway, I have no idea how 'tiny' this actually is, but maybe someone has something similar they can tweak, or can recommend a commercial product that will do this. Thanks.

For now, I doubt I'll have time to help, but I'm still curious and want to ask for clarification:

1. When you say roll over, that just means that the entire duration can span two days, right? Like, a two hour event starting at 11pm and ending 1am? Not a two hour event starting at 4pm, pausing at 5pm, and resuming the next day from 9am to 10am, right?

2. An event would NOT be constrained by the "cannot start less than x minutes before/after another copy of the same event" requirement for second a parallel event?

pseudorandom
Jun 16, 2010



Yam Slacker

Volguus posted:

Request Fill
Name: Events Scheduler
Download link: https://github.com/sa55231/scheduler/releases
Source Code: https://github.com/sa55231/scheduler
Features and Usage: It provides a barebones application to aid the scheduling.
Screenshot:


More updates will be coming, but the first few releases have been deemed acceptable enough by the requester.


:eyepop:

Wow, very well done.

pseudorandom
Jun 16, 2010



Yam Slacker
I might try doing this if I get bored, but no guarantees. A couple questions though: Would you want some kind of minimum/maximum shift length? Would there preferred shift change times?

Adbot
ADBOT LOVES YOU

pseudorandom
Jun 16, 2010



Yam Slacker

Sri.Theo posted:

Thanks so much. I've been trying to get this to work but keep getting an error "SyntaxError: unexpected character after line continuation character". Is there anything I'm supposed edit about from username? I've tried both '@borisjohnson' and 'borisjohnson' for example and get the same error.

Are you using the script exactly as it was posted or have you modified it? If it's the one posted, make sure the quote characters aren't missing in the line with "\n\n\n\n". It may also be worth verifying those are basic double quotes, and not the fancier ones like “ and ”.

If you've modified it, look for any other potential occurrences of this slash character: \

Make sure they're quoted or escaped properly.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply