How can you export code when using a Mac? - macos

I am a teacher trying to work through COVID distance learning with students who are learning Processing.
I am not a Mac user and I can't figure out how to help the students save their files (or export them) on their Macs so that they can share their code with me.
Screenshots would be very helpful so that I can share with them how to do this on a Mac.
Thanks!

I think the process is quite simple, just click "File" in the top menu and then select "Save" or "Save As ..."
Once they have saved the file, they just need to navigate to the folder using the finder and right click > compress the file. This process will generate a zip file that they can share with you via email.

Related

Windows: How to associate developed software with a file type for context menu "open with"?

I'm not a Windows developer and my knowledge of the OS is very limited.
I wanted to write a very simply image viewer software for the Windows OS because such a thing doesn't seem to exist but we have such tools for Linux and they work well.
I am now at the stage where I have something working. But I have no idea how to "install the software program I have written" so that I can associate it with file types such as jpeg and other image files.
I have written this program in C++ although that probably isn't particularly important information.
The point being I am left with an executable file and no idea what to do with it.
I guess the first step to "install" it would be to create a directory in C:\Program Files\ and simply move the file there, although I'm sure I can do some research and figure out how to write an MSI installer to do that.
Where I become stuck is on other things, like how to create a start menu entry. (Desktop shortcut is easy it's just a link, moved to the users Desktop folder?) And then how to get a right click entry for file types such as PNG bmp and jpeg. (So that "open with" "my program" works)
I tried doing an internet search for this kind of thing but really didn't know what to search for. Can anyone offer me any advice on this or point me in the right direction?
Or is this perhaps the kind of thing I would just get an MSI to do everything for me?
For adding a Start Menu entry, you'd need to write a link into C:\ .ProgramData\Microsoft\Windows\Start Menu\Programs.
There you can add just the link to your application or put it in it's own folder. As for the Context Menu entries, there are two options: Adding it manually (But my guess is that you want your installer to do so) by selecting the exe or by modifying the registry.

How to put my OneNote notes from my machine to onedrive?

I have several notes on my OneNote on mac. I accidentally deleted the OneNote file on my OneDrive.
I have a copy of the notes on my mac but It is, understandably not able to synch with the server because the file is not there on the server.
How do I put the notes I have on my mac on the server?
I created another notebook and tried moving the notes one by one to this one but i get the following error.
The sections you're moving have not all been synced. Make sure you are online and fully synced before you move sections between notebooks.
Is there some way to get OneNote to ignore this?
I recommend following the instructions of this wiki:
https://support.office.com/en-us/article/How-to-move-my-local-notebooks-to-OneDrive-or-SharePoint-7343c424-cdee-4bbf-9245-312549e81fc0
After trying various options, this is what worked for me. It is not exactly what i was looking for but i was able to save my notes.
I used the OneNote 2016 (not the free one) to export all my sections to files.
Note: You cannot do this for the whole notebook, fortunately you can export whole sections.(small mercies).
These show up as 'Open Sections'. Once I had exported all my sections. I copied them one by one from the 'Open Sections' to another notebook. I synched this notebook and that was it.
I finally found the answer in this blog post: https://40north.wordpress.com/2020/01/10/salvaging-onenote-notes/comment-page-1/?unapproved=2063&moderation-hash=1ddd37becedb0462043fad528bd5d3b1#comment-2063
Essentially you need to:
Create a new notebook
Create new sections in that new notebook with the same labels as the old notebook (time consuming I know)
left click the top page in the old section, hold shift click and left click the bottom page
move those pages into the new section
repeat indefinitely
If someone can figure out how to write a script for this, that'd be great, but for now I'll just do it manually until it becomes tiresome.

How to load scripts from a custom folder in InDesign? like from a central repository

I would need a folder to be shared on the server and InDesign CS6 would need to load the scripts from that particular location.
Is this possible?
If you just want to include other scripts in your script you can do this:
$.evalFile(new File(mainscriptloc + "/c/some/folder/central.jsx"));
It will load central.jsx into the executing script just like an "include" file.
On a Mac? I found this solution useful:
http://tewha.net/2012/07/make-a-symbolic-link-from-finder/
The best way I found is to create a folder in any place you want your scripts to be (like a server) which is shared with all the users. Then to setup and run the scripts will be more tricky:
Open ExtendScript Toolkit
Open "Scripts" tab
Click on the top-right button and "Add Favorite"
Choose your path to the script and click ok
Now you can click on the drop down on the left and select "Favorites"
Click on the right drop down and click on your folder name
Double click on your script and run it
Now you are running scripts directly from the custom folder.
The startup script cannot be run from there... so it only works with scripts.
We create links in the users individual scripts folders that link back to the actual script in the central repository on Windows. The downside is of course that users will reasonable often accidentally copy the actual script, rather than a link to the script - and then they miss out on future updates to the script.
Below is an example of a typical users 'scripts panel' folder. Each of the shown shortcuts point at a file in our central repository.
When the user opens InDesign these shortcuts appear in their scripts panel the same way a regular script file would.
On a Mac, I suggest using symlinks (a special kind of OSX shortcut - go here for instructions and an Automator workflow download that will create one whenever you need it).
To create a shortcut, simply select the desired folder (recommended) or file located elsewhere on your computer/server and run the workflow (I suggest making a keyboard shortcut to the workflow as described in the instructions). Drag the shortcut created into your inDesign scripts folder and it will appear and operate exactly as the actual script or folder would in your Scripts Panel. Simply click on the link and inDesign will do the rest - you'll never know what you clicked is not the actual folder/file or that it's located elsewhere.
Note: if you create a shortcut to a script file rather than a folder, be sure to remove the extra text the workflow adds to the name (ie. when applied to "MyScript.jsx", the workflow will create a shortcut named "MyScript.jsx symlink". Remove the " symlink" part so inDesign will recognize the shortcut as a script file. Otherwise it will not run).
I've tested this with inDesign CC on my Mac and it works flawlessly.

Access file name in Automator from Folder Action

I'm trying to create a simple Automator workflow that will prompt me for where to move and rename a PDF when I download one from the web. I want to use this for downloading my monthly financial statements.
I'm getting stuck at what I thought would be a simple problem: passing the name of the new file(s) from the Folder Action into the Automator workflow.
How is this done? I tried the "Get Specified Finder Items" action, disabling its input, and passed that to "Set Value of Variable" and in turn to "Ask for Conformation" so I could display the name of the file. It seems whatever I try, I cannot find how to pass the name of the newly downloaded files to the Automator workflow.
This seems like it should be simple. Does someone have an example of an Automator workflow triggered by a Folder Action that passes the files into the workflow?
For the life of me, I can never understand Automator. However I believe I can help in this case. The action you are looking for is called "Get Selected Finder Items" -- it is not intuitive, blame Apple for that.
To test out, I created a folder called "automator_action", then I started Automator (in Snow Leopard) and chose "Folder Action". This is the step you will need to figure out if you are using Leopard or earlier OS.
Next, I drag the "Get Selected Finder Items" (under Finder) over to the right pane, then I dragged the "Rename Finder Items" over and customized it. Finally, I saved the action and ready to test it out. You can see the picture presentation of my "script" here:
http://farm3.static.flickr.com/2590/3937364947_33b1a3ab45_o.png
I tested out the action by dragging a file into this folder and sure enough, the action renames it the way I intended. Dragging multiple files also works. Good luck.

Explore containing folder instead of open containing folder

I use Visual Studio to do a lot of my coding. I find the open containing folder feature quite helpful. But I don't want the folder to be "opened" by the windows explorer, instead I want to "explore" the folder -- you know, get the nice little frame showing me all the other folders on the left hand side. Does anyone know how to do this?
Thank you,
Rohit
When invoking ShellExecute(), use the explore verb instead of the open verb: http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx.
Edit: If you don't mean programmatically, open Windows Explorer, go to Tools -> Folder Options, select the File Types tab, locate the Folder entry in the list (not File Folder!), click Advanced, and set "explore" as default instead of "open".
There really isn't much difference anymore between 'explore' and 'open' if you're talking about a folder. They both open the same window, just with different options active. When you 'open' the folder, you're only one click away (on my system at least) from seeing the folder tree as well- just click the "Folders" button in the toolbar.

Resources