How is it called the feature of persisting process images in OSX? - macos

How do you call the feature of OSX being able to restart, but persisting each process state, in a way that after restating is finished it can restore each one of these processes exactly how they where previously?
For example a movie would still be paying in the same part, a text document would still have half of the sentence written even if I didn't save the txt file to disk, the browser would still have the same tabs opened and the same amount of scroll done, etc.

People call it in many different ways but "Application persistence" and "State Restoration" seem to be the most "official" ones.

Related

Windows Task-Scheduler: can one start an application whenever another one gets started?

I am seeking a possibility to always trigger a second application whenever another application gets started (ideally: right before the latter gets started but probably more or less "at the same time" will suffice).
The issue at hand is, that our company's IT folks for some to me unexplicable reason insist on constantly "adjusting" some Windows registry entries. One of those entries is the flag to memorize the passwords for the mail servers that Outlook keeps polling. Having to re-enter these passwords over and over again is driving me nuts and so meanwhile I also figured out which entries I have to revert to stop this nonsense. I thus now have a .reg file that I always "apply" to the registry right before starting Outlook and that helps me to maintain mental health.
But it is of course tedious to always have to click TWO icons in sequence, when opening my mail app. (Outlook). So, while I could certainly replace all Outlook "shortcuts" with shortcuts to a script file first applying the registry patch and only then starting Outlook I was wondering whether there wouldn't be a more elegant solution.
My question thus: is there an option or tool (e.g. in Windows' task-scheduler) to trigger the start of an application 'B' whenever a specific application 'A' gets is (or is about to be) started?

Writing a c# or c++ application which can detect if browser is going to download a file

I am going to write an application which runs in the background on windows platform. If user is working on any browser (IE, Firefox, Chrome, etc) and any of the user action results in downloading activity, the background program should take control. The background program pop-ups a window asking user, if they want to download. If user proceeds with OK, then background program sends signal to browser to stop its download process and the background program will do download. If user rejects download by the background program, then default download of browser can go on.
For this please suggest if any working model is there in c#/VB.NET/C++ or how to achieve this activity.
Will very much appreciate your kind help.
Thanking you very much in advance.
I don't think you understand the whole notion of downloading. Any resource you get from the Internet is downloaded. Hence, anything would trigger your application. You can, however, try to "parse" URL to see the extension but this does not have to mean nothing, since you can give any file an arbitrary extension (well not exactly arbitrary, but you know.. ). Another option is detecting FTP downloads ( i assume this might be of more interest ). This way you'd "only" have to check for a specific protocol. The reason i quoted only in the last sentence is that none of these tasks is a simple one.
You basically want to write a Proxy, or use an existing one.
You might wanna take a look at WinPcap
Finally, none of this options really give you the infromation whether user is going to download a file. But if you write a proxy, you could stop the endpoint application of obtaining that file once you download it.

Prevent any action until code finishes in vb6

I mean preventing any action closing-unloading-terminating they all should be prevented until the code finishes working..
Esspecially termination should be canceled until code finishes working..
I want to do this to create a very important .log file and with it moving some files between folders so i must prevent the guy that thouches everything in server without knowing a thing about and being called as system administrator from stopping this action just cause he doesnt like it to run in the background (if u got what i mean). Cause im having log about that server and moving files which can cause data loss. Im pretty sure most of the programmers lives trough such unnecessary thrust problems with old people and i need help to deal with this situation.
So how can i achive that in vb6?
You probably need to redesign your application logic to allow terminating your process at any stage - move files by rename_src-copy-rename_tgt-delete_src operations, close log file after each event written etc etc. Ideally you should be able always identify which operations are done purely on info, provided by file system (file names etc).
There are cases when terminating process is required, after all.
Otherwise, if your application has visible window, you can track Form_QueryUnload events and just cancel unload. Of course this doesn't prevent killing your app from task manager processes view.
While you can stop the user from trying to close the application by handling the QueryUnload event (assuming you call DoEvents periodically) there is nothing you can do to stop someone with full admin rights killing your process outright.

How to download a bunch of files from many links on an open browser window?

Okay, this one is hard to classify for me because I don't know the solution yet.
There are these credit card statements that I have to download from my bank's website, but the crazy thing is that they have one separate pdf file for each month - that's like 60 files for last 5 years - and I need to go through all those transactions!
So, being lazy as I am not to just download them one by one, I was wondering if I could write a script or a simple program that can just download these files once I have the browser window open.
Now the key is this - the program cannot directly make an http call to the bank's website, because this window is behind an account authorization screen, after a few clicks to get to credit card statements. What I want to do, is just open the window, and then run some program, and voila, all the files are downloaded.
And just for some super-kicks, it would be awesome if the program could read those pdf files, parse the tables in the pdf and put them into a spreadsheet or something - if someone tells me how to do that in a few hours, you'll get some serious respect and love.. but even the above should be good enough..

Can an app use the clipboard for its own purposes? (read: who owns the clipboard?)

In PowerBuilder's IDE, the code autocomplete feature uses the clipboard to communicate the completed text to the code window. By doing so, it overrides whatever was stored on the clipboard before. So, if you had the winning numbers of the next lottary stored on your clipboard, and you used the autocomplete to turn m_goodfor into m_goodfornothing, you've just lost your only chance of ever getting rich, and you're left with nothing on your clipboard.
Features like that are the reason I hate software. It looks like it was implemented by some intern that noone was looking after. However, there's also a chance I got all worked up for nothing, and making such use of the clipboard is absolutely legit. So, can an app use the clipboard for its own purposes? Who is considered the owner of the clipboard?
(Bonus votes to whoever puts himself in place of the feature's programmer, and provides some reasoning for this being done on purpose, assuming the users would actually benefite from it)
You are probably right on the intern reasoning. There is absolutely no reason why an application would use the clipboard to communicate information other than pure laziness. Even between processes, there are other, better ways of communicating information.
Other then letting the user paste information in another application, there is no reason to use the clipboard.
The programmer did it because it was easy, and put his needs above those of the end user. There are many programs that do this, particularly add-ins to outlook, VB, etc., which copy/paste their buttons onto the toolbar. Any user that runs a clipboard extender (like my own ClipMate) will absolutely hate this behavior (and you'll be "busted" right away).
Here is my favorite quote on the subject:
“Programs should not transfer data into our out of the clipboard without an explicit instruction from the user.”
— Charles Petzold, Programming Windows 3.1, Microsoft Press, 1992
An app should never change anything on the clipboard without the user initiating that action. My .02 anyway.
Bonus votes to whoever puts himself in place of the feature's programmer, and provides some reasoning for this being done on purpose
Using clipboard for application communication
They are always a better way to do it. The programmer might have done it this way because it was faster to implement OR because he really wanted to have this value in the clipboard after the action. At least, if he didn't wanted to have it in the clipboard he could have get the value from the clipboard, store its value then replace the old content of the clipboard inside the clipboard and everything would have be more "transparent" ans less frustrating for the end-user.
I have built a piece of functionality into an App that uses the clipboard. Business was requesting a way for users to seamlessly capture a screen shot and upload it.
I worked with the business to develop it and what we came up with was a user simply hit the print screen key and clicked "upload" in my app.
The Java Applet running in the background pulled the image off the clipboard and displayed a formatted preview to the user, The user then added in a file name and description and clicked save.
Using the clipboard this way saved the user the time of having to capture the screen shot save it somewhere then find it through an upload interface. Even if we did go that route by the user hitting print screen to capture the image in the first place they are already overwriting whatever was on the clipboard in the first place.
Using the clipboard isn't all bad but I certainly agree using it in an IDE is a def no no.

Resources