Is OSX Lion Preview application scriptable? [closed] - applescript

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Is OSX Lion (or older OSX) release of Preview scriptable?

Preview is not now, and have never been AppleScript-able, which does suck. It'd be nice if it were, though.
From this blog:
However, from 10.4–10.6 it was possible to enable the default Cocoa
scripting support via these Terminal commands:
sudo defaults write /Applications/Preview.app/Contents/Info
NSAppleScriptEnabled -bool YES
sudo chmod a+r /Applications/Preview.app/Contents/Info.plist
This was sufficient to
be able to get at the file of the current document to delete it,
change its Finder label, import it into EagleFiler, etc. Under 10.7,
modifying the Info.plist file breaks the application’s code signature.
I would expect this to cause a harmless warning message in the
Console, but it actually causes Preview to crash.

If you want to find out if Preview (or any other application) is Applescriptable, then just try File > Open Dictionary in Script Editor.
This is described in Apple's documentation here.

If you really need to script it, you could always use GUI scripting. This method allows you to script any application, although it can be ugly and tedious to get it to work. Only use as a last resort.
You can find more information here : http://www.macosxautomation.com/applescript/uiscripting/index.html

Related

How To Tell What Software Tool Created An EXE File? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Is there a way to determine what software tool was used to create a specific exe file? For example I'd like to find out if Delphi or Visual Studio or [Fill in the Blank] was used to create a program.
UPDATE:
I'm using a program called FoxtrotOne from www.enablesoft.com that uses a script and a datafile. The program acts just like a person sitting at the keyboard doing data updates. I've been continually monitoring the task manager and the FoxtroneOne.exe and the memory continues to climb as it loops through the dataset.
I've been told by the tech support guy to close IE after every 100 records because it's holding onto memory. My script interacts with a web application.
I'm convinced that there is a memory leak within FoxtrotOne. If I could determine what IDE they used I could suggest what low level tool they should use. For example if Delphi created this exe then I would suggest they install madExcept to check for memory leaks.
FINAL UPDATE:
I used Exeinfo PE to detrmine FoxtrotOne was created with Visual Basic 5.0 - 6.0
Open the EXE in a hex editor (such as HxD), and you might get a lot of clues. For instance, if you find a lot of VCL-related strings like TLabel, TForm, etc., it is probably an Embarcadero tool.
You might also open the EXE in a resource editor (such as XN Resource Editor) to get more clues:

App giving "cant open .app because classic environment is not supported" on other macs but works fine on my own [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have written an app that is a bash script, the whole thing is a bash script, and it calls a few osascripts, also for user input mostly, it works awesome on my computer, and so I used platypus to turn the script into an app so that I could send it to a friend, well when he tries to open it, it says you can't open the application ** because the classic environment is no longer supported: http://www.imgur.com/ze0ya4B.png
Any Mac running bash should be able to at least run through right? Could it be something with osascripts? I can't find anything in forums where someone has the same problem and solves it.
Tl;Dr: bash script put through platypus, and new .app file gives error when another Mac tries to open it.
I am running mountain lion so my macbook should not support the classic environment either, what could be making other computers think that there is something from a classic environment. If you think it would help I can upload my source code.
I have to assume that the error I was getting was not very relative to any of the information I gave. It turns out you can't just email a .app file and expect it to come out in tact on the other side. I zipped the app in a folder and it works fine. Incase anyone comes across this same problem, I thought I'd post my situation... I hope this helps someone at some point because I was sure bashing my head against a desk.
I'm pretty sure the message is misleading, and it's actually not runnable for some other reason. That dialog box looks like an older version of OS X; might it be too old to run the version of Platypus you're using? The current version requires OS X v10.5 or later running on an Intel CPU. For OS X 10.4 and/or PowerPC CPUs, Sveinbjorn Thordarson (the author) recommends Platypus version 4.4 from here.

software creator that is using shortcuts inside an other [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am wondering if there is any software that can create a software with shortcuts inside another?
Like if you want to make an web editor you cold say that if you press that button it will write:
<html></html>
And use a browser to render?
If there is no software like this, is it possible to make?
Maybe I am wrong, but I think it will be a breakthrough for opensource development.
I am not a skilled developer so that I won't manage to make something like this, but I want to start a group to do this, with making a website for it. Do you think someone wants to help me or maybe one of you?
I have searched the web for something like this but haven’t found anything.
Edit:
I know this was quite bad formulated and am going to explain this again.
And what I mean is not a web editor, but a software developer application.
The web designer was just a example.
Imagine yourself that you have a UI designer whose you can import other software’s in and then you drag a button in to the screen, and on the settings you say that when you click that button the software will go into one of the software’s you’d imported and do something.
The software I am asking for is this software developer software.
Edit again:
I will do a second attempt to clarify:
You know about bots right? Those who fly around on the web and to crazy things as cheeking hotel prizes to playing poker.
I only wonder about if you cold make a new GUI like QT or GTK that would emulate a certain keyboard event or mouse gesture when clicking a button. And were to get started when doing so.
http://www.linuxquestions.org/questions/linux-newbie-8/kompozer-problems-733285/#post3580690
There's several powerful web editors in a list composed by someone there. It includes editors with a WYSIWYG.
Aptana studio is what I use which can use different browsers to render. It also has a built-in web server so that you can test AJAX requests and php rendering.

How to use an existing Mac app via command line? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am looking to adapt a css formatter app I downloaded from the app store so I can control it from the command line. Basically before I push a file to github I would like to have the app format a .css file. So I am wondering How I would get the app to run its process without doing it by hand.
I am not sure where to begin... I have xcode.
So my question is, where do I begin?
Can you point me to any articles of people that have done something similar?
What files should I be most concerned with in the app?
Thanks for the direction
If it's a regular app from the Mac App Store, you can find the executable in the app bundle at Contents/MacOS/AppName.
So to start the Mail app for instance you would have to execute this:
/Applications/Mail.app/Contents/MacOS/Mail
Assuming you don't want to just start it from the command line, you want to make it do something useful.
1 - Disassemble and link your own program
A Mac app will have an executable (in TheApp.app/Contents/MacOS/APP_NAME) in the bundle (which is just a directory). Xcode won't really be all that much help.
The app will most likely use AppKit / NSApp Cocoa framework and the executable will create an App instance, set up the GUI etc, register things. Cocoa apps work on a system of delegates, callbacks, etc. It's not just one main function that runs synchronously. They almost certainly won't export simple external symbols that you can link against and call. And even if you did, you'd need the header files.
You could look into an Objective-C disassembler, as the compiled executable probably has enough symbols to work out roughly what's going on. But you'd need to know a fair bit about Objective-C and Cocoa (at least, enough to know that this will be tough).
So Option 1, which isn't really an option in unless you know what you're doing, is work out what the program symbols are / disassemble the executable, and write your own application that links against the binaries and calls the relevant methods.
2 - Script the GUI
On another tack, you could look into whether it's Apple-scriptable. You could start the app, record activity (look at the AppleScript editor's record functionality) to script the actual GUI. This might work.
3 - Talk to the author
I suggest you talk to the author if you really want this. Perhaps they can make it usable as a command line tool.

Hidden Windows shortcuts [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Anyone know where I can find a list of the different hidden shortcuts built into windows like "control userpasswords2".
I'm building a small app that will help my team get to those buried panels such as the pagefile settings, IE's proxy settings, Editing the Boot.ini
***I am not talking about shortcut keys like ctrl+alt+del. But commands you can put into the run dialog.
Thank you
To elaborate more, I'm looking for a list like MS KB192806 & commands, & another. That gives me some of the commands I'm looking for like "control intl.cpl". However I'm looking for others that are not in that list and I would like more control. For example to go strait to the connections tab when running "control intl.cpl".
You can find control panel specific list here:
http://support.microsoft.com/kb/192806
For your application, I would recommend you to design the required interfaces and take the input from user directly in to your application. After that, you can make the user defined changes from your program. Most (not all) of these settings are stored in registry which you can modify appropriately. Its easy to find the required registry key by searching on net or using some monitoring tools (like regmon or procmon).
Also note that, just setting the registry values will not always update the configuration immediately. Some setting changes have to be notified to the respective programs.
There are few similar software already available on the net, which can do management of few basic stuffs.

Resources