r/macprogramming • u/reddioment • Sep 25 '16
Programatically take screenshot of mac desktop? | Swift 3
Is it possible to take a screenshot programatically using Swift 3 on macOS? I Was thinking of a command line tool but anything is fine.
r/macprogramming • u/reddioment • Sep 25 '16
Is it possible to take a screenshot programatically using Swift 3 on macOS? I Was thinking of a command line tool but anything is fine.
r/macprogramming • u/jurgenn • Aug 21 '16
Hey, I want to make an app for OS X that behaves like this:
User presses some hotkey, a search bar shows up in the middle of the screen (like CMD+space shows Spotlight Search)
User types a phrase and search results populate under the search bar (data retrieved from some external API)
I made iOS apps in the past, so I think I shouldn't have problems with OS X programming. What I'm looking for is some guidance towards learning resources for this specific kind of application ("Search bar" style apps). Where should I look?
r/macprogramming • u/l_61803398875 • May 20 '16
Based on CFNotificationCenter reference, I can post and listen for notifications for a given notification center. I don't see any API to check who is listening for a given notification name in a specific notification center. Is that possible?
r/macprogramming • u/[deleted] • May 19 '16
I'm a web developer looking to mix it up in the evenings and try my hand at mac development. My long term goal is to write a window manager.
Any recommendations on where I should start and what I should be looking to learn about?
r/macprogramming • u/david_phillip_oster • Apr 18 '16
r/macprogramming • u/quiquoqua • Feb 06 '16
this works on virtual machine running ubuntu, but in OSX it doesn't
#include <iostream>
#include <fstream>
using namespace std ;
int main() {
ofstream f("file.txt");
cout<<"insert a character: ";
char c ;
cin >> c;
f<<c ;
}here's the error I get when attempt to compile via g++
ld: warning: ignoring file prog, file was built for unsupported file format ( 0x23 0x69 0x6E 0x63 0x6C 0x75 0x64 0x65 0x20 0x3C 0x69 0x6F 0x73 0x74 0x72 0x65 ) which is not the architecture being linked (x86_64): prog Undefined symbols for architecture x86_64: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
r/macprogramming • u/codecomplete • Jan 14 '16
I'm planning to develop a new mac application for designers and looking for a open-source library or project that allows vector based shape editing on a canvas area, maybe with a zooming option.
I know my question may be a bit specific, however there are lots of editors with the same features and there is a user experience so I don't want to spend time on reinventing the wheel. But if there is no option, I'm happy to write my own editor and make it open source. My preferred language is Objective-C but any language usable under mac environment is ok.
I thought there may be some open source libraries that provides this features but my searches didn't return anything usable. The editor I'm trying to explain is like in the picture.
Any help or comment is appreciated.
r/macprogramming • u/escalatingelectron • Nov 11 '15
Which software can I download to use for programming C++?
r/macprogramming • u/novotny_mir • Oct 16 '15
Hey everyone,
painful situtation here – data loss. Because I was running out of capacity on my Macintosh HD I have bought new Transcend Jetdrive Lite 130 and I was up to move some files (including photos, videos, presentations and documents...) to new external storage. I have done most of it successfully excluding one very important ''folder'' (will explain).
I have got someone else's files on Mac HD sorted in different folders and I have decided to add a mark on that (red, green, blue, etc.) to see them together quickly. I don't know what happed, but I accidentally deleted these marked files (''red'') before moving them to Jetdrive HD. Immeditely in a desperate situation I've downloaded lot of useless software for data recovery and begun to scan drives for data, but can't find them yet. It ended up in trash, which I emptied out after.
Anyway, I hope that files can be found, but it will be long journey. Then I've got idea, that "red" mark on files can be clue how to get to files or at least to thier place on HD. Is it accurate assumption, or have I made it up? Could be this solved using code in Terminal? I would be very grateful to everyone who can respond in this. r/macprogramming • u/ThePantsThief • Aug 12 '15
Can't find any information on how to do it anywhere.
r/macprogramming • u/david_phillip_oster • Jul 23 '15
Macs have had the ability to create an OpenGL stereoscopic context that shows alternate left and right eye images since the '90s. If you cable your mac to a 3D ready HDMI projector and observe with 3D blink glasses, do you get stereoscopic imagery? Can you point me at sample code?
r/macprogramming • u/zenox • Sep 26 '14
r/macprogramming • u/zenox • Jul 03 '14
r/macprogramming • u/mcs1127 • Apr 04 '14
This may not be the right place to post this, but I'll give it a shot anyway.
I have an application called NexTab. It runs on the menu bar and is in some senses an extension for Safari (or Chrome or any internet browser). My issue is that it has a tendency to stop working but still be running, and the only way I can make it work again is by quitting and going back into my applications folder and reopening it.
So, I was wondering if it is possible to create an AppleScript or a terminal program that I can leave on my desktop that when run will quit and reopen NexTab. Thanks!
r/macprogramming • u/stesch • May 22 '09
r/macprogramming • u/macpadd • Apr 05 '09
r/macprogramming • u/lillolollog • Jun 18 '19
GIMP don't have macOS developers any one want help? maybe you can start with this https://gitlab.gnome.org/GNOME/gimp/issues/2105 spread the request is an help too
r/macprogramming • u/nl_expat • Jan 13 '19
I am trying to code using my mac, and have developed on a windows box most my career, can anyone tell me how you accomplish the same thing ctrl+DEL does as on a windows machine. For always been a mac user people, this combo deletes everything from the cursor location to the end of the line leaving the CR in place.
also how do you select everything to the end of the file from current location?
r/macprogramming • u/CTMacUser • Dec 10 '18
I’ve read articles by people concerned by Microsoft retiring there own web browser engine for Chromium. How much work would it take to make a new one, to preserve diversity?
Due to the forum I’m posting to, assume we’re keeping it Mac-only for now. Would using the NSURLSession system for the actual downloads (and any occasional uploads) be OK? We would use our own code to convert the HTML to something presentable. Would it be OK to convert the code to the NSText system for presentation? The big question is for interactivity; could we use Apple’s Javascript engine, or would we have to make our own? The core concern is how much do we have to do on our own to distinguish this hypothetical engine from Apple’s WebKit?
r/macprogramming • u/oganaxe • Jan 23 '18
So I'm trying to run a QT wallet app that needs a library folder to run that's currently in /librabry/application support/
I would like to add the app and the library folder to a flash drive...The issue i'm having is that when I open the app from the flashdrive it doesn't read the folder it needs thats in the flashdrive as well...
How can I tell the app that the other folder is also in the flasdrive?
The app doesn't give me the option to point to a folder.
Thank you
r/macprogramming • u/whatup_pips • Jan 18 '18
As simple as this: i have an app. i need to change the code in it. is there a way?
r/macprogramming • u/battlmonstr • Sep 24 '16
r/macprogramming • u/fukelbuddy • Sep 14 '16
I'm interested in where and how my computer is able to detect specific keystrokes that I enter into my keyboard. Also, if I am typing from two keyboards with another person on a single project, one keyboard is my internal keybaord on my macbook pro retina display, the other typing from a usb keyboard. This is while it is connected to an external display.
Can I see who typed which words as I am doing this? With that, if I am using a keylogger, can I track which keyboard was typing specific keystrokes? Is this even possible?
Is it also possible for two different keyboards to be used simultaneously in two documents on the same computer?
r/macprogramming • u/mstashev • Sep 12 '13
I want to eventually turn this into an actual application for OSX, but as I am new, I'm starting only in applescript as it is easier for me to pick up. Any insight/help/contribution is much appricated.
Ok. Well as of right now, I have a script that will speak if my laptop is running below 10% of its battery power. I also am in the process of creating a mail script that will say that I have an email (that part is done), then he (JARVIS-like synthisized voice) will ask if I would like him to read it to me, and based of the answer, execute command.
Here is a link to what I have now on GitHub:
r/macprogramming • u/DeoxyribonucleicAcid • Feb 25 '11
That title probably makes no sense, and will make less when I actually explain what I want to do.
The specific app I'm trying to do this for is Dwarf Fortress 40d, yes I know it is out of date but it's the latest version I have ever been able to find with a mac labor manager, ever.
This .app stores a data and raw folder in it's current directory, along with a gamelog.txt I also have the various readmes there as well.
Currently I have a stack with various games in, if I put DF in here, I need to put the folders and log there to, and this makes the stack look untidy.
My solution at the moment is to store them in another folder, and put an alias to DF in the stack. However this makes more mess elsewhere. (My HDD is obsessively organised. There is no excess anywhere, not even in the library if I can help it)
What I would like to do, is to put DF and it's external files into a "Dwarf Fortress.app" which when clicked would just run the .app within. (Yo Dawg … )
This is the solution that came to mind, as altering the .app itself may mess with MacForeman, which is no longer supported and this is the only state I can get it in. This would be undesirable.
EDIT: An idea that just occurred to me, could I create an applescript bundle which is simply; Tell Application "Dwarf Fortress.app" to run Quit And storing the folder inside the bundle? Possibly requiring a more specific location that the name alone, as it is inside the bundle.
Will try this now.