Is there a way to use PhantomJS's command line options programmatically?
Perhaps even from CasperJS?
I doesn't make sense to change the value for most of the commandline options programmatically. For example, why would changing the cookies file or the disk cache option be a good idea during script execution?
Others can be set in the settings such as the loadImages and webSecurityEnabled options.
A special case is the phantom.setProxy function which was merged into the master branch, but as of 1.9.8 not yet released. You will have to wait for PhantomJS 2.x to use it (or compile the source right now).
Related
According to https://github.com/mintty/mintty/issues/944 since mintty 3.5.1 there should be a tab bar where you can open multiple tabs with terminals in parallel. For that reason I performed an installation of MSYS2 which includes mintty 3.5.1, as this seems to be the way how to use the mintty. (I verified this with invoking mintty with -V.)
However, I do not find no possibility for opening and/or managing tabs in the UI.
My requirement: I would very much like to have tabs for organizing terminals in parallel.
My question: What's going on here? Did I miss something? Do I need to execute the mintty/MSYS2 with some special commad line options? How can I enable tabs?
You could use --tabbar option when staring minnty. see here for more information.
It was difficult for me to figure out how to turn this feature on. The answer is sprinkled through the comments of this issue, but not in one place. Therefore I'm posting this to save time for others. Here's how you turn the feature on:
Add --tabbar=4 or --tabbar to the windows shortcut that opens mintty:
The 4 is documented here:
no geometry handling; terminal session windows are separate [default]
sync. position/size when switching/launching/closing a session
sync. also when window is moved or resized
sync. also when window is minimized
sync. also when window is started separately
If you'd like to create new tabs with ctrl-shift-t, close tabs with ctrl-shift-w, switch to previous tabs with ctrl-shift-tab, and switch to next tabs with ctrl-tab, add -o "KeyFunctions=t:new-window-cwd;w:close" as an option to that same line.
Personally, I'd like to have ctrl-t/w open and close tabs, respectively, but the only way I've figured how to do that is to add this option: -o CtrlExchangeShift=yes. The problem is, that changes all ctrl-shift commands to become ctrl commands. That means ctrl-r no longer searches bash history.
When you run the shortcut and create some tabs, mintty will look like this:
I have these lines around text and explanations popping up annoyingly.
Is there a way to turn these off?
I tried to look in settings and to adjust them but nothing works out.
P.S. ignore the code, it's just for example
White lines surrounding code like that are generally indicative of something like a code linter or other similar tool giving you an indication that there might be something wrong with the code (such as not following a code convention of some sort). The code explanation is a popup showing you the arguments and documentation for whatever function or method you're working on.
Both of these things are something that Sublime doesn't do on its own; you have installed a package of some sort that provides this capability.
If you were looking in the regular Sublime settings (Preferences.sublime-settings) for options that control this, they won't be there. In order to configure these away you would need to determine the package that you installed that's doing this and then configure that package not to do it or, if that's not possible, remove it.
If you use Preferences > Package Settings > Package Control > Settings - User from the menu, you can inspect the installed_packages setting to see what third party packages you installed and investigate which one of them is doing this.
Possible packages that do something like this would be Jedi or one of the Anaconda packages; essentially anything that says that it provides code support and assistance for Python is a candidate here.
Once you find the package in question, you can look in it's settings directly to see if you can turn the features you don't want off; failing that only removing the package will stop it from displaying these things.
These lines are called linting. Linting is the process of running a program that will analyse code for potential errors.
In sublime text it occurs usually because of some packages that you have installed...
In your case, it is actually the anaconda package and some other packages. It can be removed easily in a few simple steps.
In the sublime text window press ctrl+shift+P to open a command pallete and then type the name of the package. I typed anaconda because it is the one giving me these lintings so there will be an option Disable linting on this file. Just click on it, as shown in this picture .
I use CMake 3.x in (more than) one of my projects. When I ccmake ., I get a terminal screen with various options to configure - supposedly, the ones a user might want to set manually before building. If I press t I enter "advanced mode", and numerous other options are visible.
Great, right? Except that some options in the non-advanced mode are such which I feel would be a better fit for the advanced mode and not be visible always (in my case it's the results of FindCUDA.cmake).
How can I make certain options only appear in advanced mode?
For make CACHE variable to be appeared in GUI (like ccmake) only in advanced mode, use command mark_as_advanced:
mark_as_advanced(my_cache_var)
Normally, mark_as_advanced is called by the script, which creates the variable. E.g. "Find" script marks as advanced some of variables obtained via find_path or find_library.
But it is correct to mark as "advanced" a variable created by some other script.
Some settings in Dymola can be altered by setting flags in the "Commands" window:
Some examples for flags are:
Advanced.AutoFormatting
Advanced.PedanticModelica
Advanced.LogStartValuesForIterationVariables
Hidden.PrintFailureToDifferentiate
Is there a comprehensive list of all Dymola flags?
Or, even better, a command to print such a list?
Or, even better, something like the about:config in Firefox?
Especially, I would like to change the default setting for the Save contents in one file checkbox to Directories - No Questions because version control software (git in my case) works better with many small files.
The Save contents in one file checkbox cannot be changed by flags, but by (un)commenting the line Dymola5StoreOnOneFile 0 in the file $Dymola$\insert\dymodraw.ini.
But many other settings can be changed using flags. Use list() to print a list of flags (unfortunately, Hidden. flags are not included in that list) or use help() to get more help.
Update
In recent Dymola versions there is user dialog with filter function for all flags. You can find it at
Tools → Options → Variables.
Since Dymola 2018 (and may be an earlier versions) there is a flag called Advanced.DefaultStoreAsOneFile. Setting to false will enable to save packages as directories.
This flag can be set via GUI as well, see Edit > Options..., and in the pop-up window, the Tab Version, uncheck As default store packages as one file. In this way, the setting will be saved in your setup.dymx (setup.mos in former Dymola versions) file and will thus not affect the Dymola for other users. You can also find some more flags in that file.
But I would suggest to split this question into two ones since there are two topics treated in just one thread.
I am trying to extract the contents of cmd.exe IDE to a text file using autohotkey scripts ie one test.ahk and its written as shown below:
WinGetText, text, "C:\WINDOWS\system32\cmd.exe"
FileAppend, %text%, C:\ThreePartition\ACTUAL.txt
I am not able to extract the contents. Can anyone please suggest the correct way to do the extraction?
The text retrieved is generally the same as what Window Spy shows for that window.
The Window Spy shows no text elements for CMD windows - what you see is not necessarily what you can get :)
What you can do is to simulate the Select All and Paste commands, and then use the clipboard contents.
I don't believe you can extract the contents of a cmd window without somehow using DllCall to read the process memory directly.
If you just want the output of a CLI command such as Grep or AWK, using stdout via the run command should work. Honestly though, I stopped relying on AHK because this sort of thing is just too clunky.
http://www.autohotkey.com/docs/commands/Run.htm.
Edit for comments:
What you want is doable, but the solution depends entirely on how your IDE works. What behavior does it have that's unique to building a project? If it makes temp files, you can overload your "build" button with an AHK subroutine that watches for the existence of those files, and then checks the modified date of the output executable to see if the build succeeded. The same kind of solution works if the IDE changes its window title when building. Be clever. :)
Failing that, you might have to install a message hook.