I just started to learn Processing and I see that any time I save a sketch it creates a new folder. I tried to Save As the sketch with a different name in the folder, but that's not allowed. I got this error message: "You cannot save the sketch into a folder inside itself. This would go on forever." Can you explain the logic of saving sketches in Processing?
Typically a Processing sketch consists of a .pde file within a folder with the same name as the sketch. This makes it easier for the Processing IDE to handle tasks as handling assets(data folder), compiling the sketch, exporting, etc.
If you want to keep your sketches organized into groups, you can create a new folder for each group then save the sketch you need there. The sketch itself with create its own folder, so you won't need to.
If you want to save another version of an existing sketch, choose a different sketch name, but choose the sketch folder to be a sibling(on the same level/next) to the older/existing sketch.
Related
I'm creating a multipage publication with many ads that haven't been built yet. I know their size, and filename, but the image/pdf doesn't exist yet.
Is there an existing script or a possible way to link an image that doesn't exist? Another way to look at this would be kind of the reverse of how the missing links (relink) button works. Where I know what the file path will be, but the file is missing.
Publishing industry standard practice:
Rather than a script, just create a blank image at the exact size. Make it florescent magenta with the letters "FPO" huge and dead-centre so no one can mistake it for the real thing.
Importantly: give this FPO image the exact file name of the file which will eventually be used/placed.
When your production image is finalized and approved, cut-and-paste the exact FPO file name into the new file. Drop the production file into your working directory overwriting the FPO file, and refresh it in InDesign. Bob's your uncle.
If this is being done to hundreds of images, you can develop your own batch process to handle this with some time-saving automation. However, this is a good example of an issue that can be solved at the production-management level, rather than at the coding level.
Hoping this helps!
I have a Google apps script that creates a new tab, which is executed through a shape that I added; more specifically a bevel. Now I would like for that same macro to create a new bevel shape on that new tab and assign it a new script.
How do I create a shape via GAS, and then assign a new script to it?
https://developers.google.com/apps-script/reference/spreadsheet/sheet
There are functions for inserting images. However there is no way to attach a script to them except for manually.
There are also no functions for getting, deleting, or otherwise manipulating an image once it is [art of the sheet. This prevents copying the an existing image. You would need to source your image from a URL or by providing a blob (sort of like file contents) probably pulled from a file in drive.
You may want to consider using a custom menu:
https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-app#getUi()
I am creating a vb6 application now and most of my command buttons were graphical style. Do the background images still show up even if I remove them from the app folder?
This is part of what goes into .FRX, .CTX, etc. files. Those are resource files created in a private "property bag" type format and are used to hold things like binary data, images, long strings, and so on.
But don't discard your source files, because you may need them down the road. Treat such things as valuable parts of the program source. They are not needed at run time though.
As far a I know it doesn't remove the picture from the command button when you delete it from the app folder, i suggest making a copy of your image and then delete the original and see if it works in case it doesn't you have the backup image, good luck.
So I've been working on this simple program to look up specs for drawings. One of the specs is a thumbnail image of the drawing. I didn't want to try managing what could be 1000's of images (that could be changed at anytime) in the database so I created a true/false field instead. If true for that record, then the corresponding thumbnail is displayed in a picture box.
It works beautifully.... if I type the entire path in the code. But what if I give the program to a friend? So I've been trying to find a way that the program would find the images to no avail. I've been searching for answers all day and am finally at this point.... asking for help.
If CBool(db.getField("PDF")) = True Then
'pbxPDFThumb.ImageLocation = ("C:\Users\Reed Havoc\Desktop\RCM Database\RCM DataBase 2015 8g\RCM Plans Tool\RCM Plans Tool\Thumbnails\PDFs\" & db.getField("Plan_Num") & "pdf.jpg")
pbxPDFThumb.ImageLocation = ("\Thumbnails\PDFs\" & db.getField("Plan_Num") & "pdf.jpg")
End If
The first line is the entire path commented out to try the second, foreshortened path.
I've been adding my image thumbnail directory to the project in all the different directories that VS establishes on start-up but none seems to be a default so that my added image directory will be recognized.
Not so clear so I'll have 2 answers.
If drawing are not going to be added but you only use the ones you already have, simply store all of the pictures in the project's resource file, which is accessible through code and builds into the EXE
If the user adds drawings themselves there are two options. There's the more user friendly method: Save the files in a Local appdata folder for the application.
Or, less user friendly and ultimately more work for you. when the application starts, ask the user to identify a directory that does / will contain images.
I am doing simulations which can take several hours to finish and I am using matplotlib.animation's MovieWriter to handle the details of writing plots of the data to a movie file. I am simply following the example script, http://matplotlib.org/examples/animation/moviewriter.html.
Is it possible to open the movie while it is being written to? I would like to check the progress of the simulation? Maybe I need to use a video format which can operate on incomplete data stream.
I know an easy alternative is to use savefig simply save an image to file, but I was wondering if it is possible to "check" on the progress of the movie by making some simple changes.
When I try to open the movie while (on MacOS) I get an error basically saying that the format cannot be understood. Once fully written the file open with no problems.