Extract the contents of cmd.exe IDE to a text file using autohotkey scripts - batch-processing

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.

Related

Upload File / Image using Dropzone.js with Selenium-Ide

Hi Everyone
I'm new to selenium, please bear with me, and guide me a little bit.
So I want to make an automation process with selenium-ide, with the hope that this automation will make testing in my project easier.
So using selenium-ide and trying to upload a file using dropzone.js, here is the normal flow.
Click the button 'Add Photo'
Windows explorer will pop up
After the file is selected, on the background, 'dropzone' will manipulate the file while opening a pop up "Image Editor"
After clicking "Confirm" the file will be uploaded to the server.
What I want to accomplish is "How can I manipulate click/select the file after file explorer opened, using selenium-ide? or is it possible?"
I have already spent hours trying to find the solution and have had no luck.
I try using the command "type" or "send key", and also on my discovery we could use javascript directly with the command "execute script", but I just don't know how to make it work
What I expect is, I could manipulate the manual proses of the selection file with automation from selenium-ide.
Thank You.
I got my own answer guys!
My goals above can be solved using selenium-ide command called "type",
Here is the explanation:
Command:
I use "type", according to selenium-ide it will store value to your element.
Target
Dropzone will create its own element 'input file' and it's hidden, of course, so this is one that we should get, instead of your own input file. You may find it with class dz-hidden-input, and since I have many file inputs I use an array at the end of XPath [{$check}]
Value This one is the exact path where you put your file locally.
**The Logic / How it works: **
with this solution, we don't need to trigger file explorer, because the above code will inject the image inside dropzone file input, and since dropzone listens to their file input which is dz-hidden-input, it will act the same way that we choose the file from file explorer.
I hope this answer will help someone whos bumped into the same problem.
Kudos XD

How to disable lines around text and explanations in Sublime Text

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 .

Load custom location list in IntelliJ

In IntelliJ IDEA, when I press Alt-F7, it loads a list of usages of whatever I'm highlighting; it's a nice list feature that allows me to jump around various lines of code that are of interest.
I'm interested in doing that in a more abstract way. If I write a script that analyzes code and spits out a list of files and line numbers, I'd like to be able to navigate those in a similar fashion. Similar to Vim's quickfix feature (and I'm sure other text editors support this sort of thing).
Example output:
project-a/src/main/java/com/example/Foo.java:34
project-a/src/main/java/com/example/Foo.java:66
project-b/src/main/java/com/example/Bar.java:198
Does IntelliJ support loading this as a list of locations? If so, how?
The case in particular I have is that I wrote a script that looks for throw statements inside a catch block that do not reference the caught exception. So I can output the locations any way that IntelliJ likes to see them.
You can set up an external tool that will run your script, and configure an output filter to turn its output into clickable links. It won't look like the usages view, but it's the simplest thing you can do.
Alternatively, you can convert your script into an IntelliJ inspection, which will let you see its results directly as you're editing code, or run Analyze | Inspect Code to get a summary of the results across your project.

Juno IDE for Julia, how to interact?

One way to comfortably use an IDE in an interactive language is to interact via the IDE in a command line environment. I am wondering if that is a possibility in Juno. In other words, is there a command line environment as in Matlab, to call functions, give initial values, and run expressions. If so what is the way to access it?
Note: There is a console window in Juno, but I can't find a way to insert my commands inside that.
Note: The question and this answer apply to the version of Juno that was based on LightTable. The current version is based on Atom and has an interactive console.
You can't enter commands into the console in Juno--that's for displaying output. Commands can be submitted from within the editor by setting your cursor in the line to submit and pressing Ctrl+Enter or Shift+Enter. The value will then be displayed in a small popup next to the line and the output will be printed to the console if you have the console visible.
Note that the inability to use the console as you desire is by design. See here for information about the console from the Juno docs.

Add options to program's right-click menu

I have a small program that reads a CSV file and outputs it in a different format.
Sometimes I want a different output format so currently I just have another version of the program compiled with slightly different code (it has no GUI, you just click on the exe and it does its job).
Is there a way I can add an option to the context menu of this program to use the different output option, perhaps by running it with a command-line argument?
I mean when right-clicking on the exe file itself, so before it is actually running.
Anything I can find when searching for answers is about editing the shell, via the registry or some other way, however I only want the option to show for this program, not every file in Windows.
Code for the command line that I would be using:
If Environment.GetCommandLineArgs.Count <> 1 Then
If Environment.GetCommandLineArgs(1) = "/output2" Then
'do stuff
End If
End If