I have installed the plugin for SublimeText3 that enables the autocomplete to search through all open files.
I am curious if there is a way to have a file open in sublime in a buffer, like vim, but not actually show open in the editor?
This would make the autocomplete much more effective.
Related
Gurus,
I am using uipath(A Ui Based Automation Tool) to download a file from a website using chrome browser.
I want browser to not prompt before downloading and just download the file in the downloads folder.
From various posts on this website i found that there exists a file called "preferences" which can be modified to solve this problem.
Before coding further i decided to do the changes in the "preferences" file manually on multiple machines, just to make sure that the changes i do in the preferences file reflect in the chrome browser as well .
I am manually modifying values for these 2 options in the preferences file.
download.default_directory
download.prompt_for_download
When i changed value for download.default_directory(Manually in Preferences file), it reflects the same in the chrome browser settings on every machine that i tested on.
But When i change value for download.prompt_for_download, it reflected in the chrome browser settings on some of the machines while on others i found that it does not reflect in the browser and rather the preferences file also seems to have reverted back to previous values.
The steps i followed are as below..
close any running instance of chrome
do the modifications in the preference file and save it
open chrome and go to settings>advance and downloads
i see DreamCatcher pointing to a similiar situation in this post, but no answers there..
I hope I can help solve your issue or at least give you some direction :)
Option#1: Chrome Settings
Wouldn't the problem be solved by changing the settings for downloads in the browser before running the bot? https://support.google.com/chrome/answer/95759?co=GENIE.Platform%3DDesktop&hl=en
Option#2: Do it in UiPath
And the other thing, is that when the prompt (to save the file) appears, couldn't you insert the path of the file that includes the default folder to save + name file + extension? (e.g. on the save path of the prompt, use type text "c:\myDocuments\downloads\filename.ext" ? I've done this in the past with UiPath...get the prompt window, type text and just modify the string being passed to carry the path, file name and extensio...then click "SAVE" or use hotkey "Enter"(if the file requires replacement, these are another 20cents you will have to program in UiPath, but it'd doable).
Option#3: Script
Another option, which I have not done, but see my friends do is creating BAT files to reset certain browser settings or the "registry"...so what they do is that they configure the BAT to do the changes to the browser and they add an activity (in UiPath) to invoke the BAT file every time the browser is opened by the robot.
Links for reference:
https://superuser.com/questions/59465/is-it-possible-to-download-using-the-windows-command-line
https://getadmx.com/?Category=Chrome&Policy=Google.Policies.Chrome::DownloadDirectory
I've created a file in HTML and would like to set a default browser to have this load from. Can this be done using HTML, or does javascript have to be added to do so?
You can do that locally as part of a shortcut. So right click in desktop> create new shortcut and you can put the path to the browser followed by the html path.
Try this in the target of the shortcut
"C:\Program Files\Internet Explorer\iexplore.exe" C:\Users\user\Desktop\1.html
There will be no other way to start a local program from HTML or JavaScript on the users computer.
To add to SANM2009's answer: you can't set the default browser via HTML or JavaScript, as this would be a huge security flaw that could be exploited to allow malicious code to be set to run when loading HTML files (with even further potential repercussions).
SANM2009's answer is the most direct way to accomplish what you want to do if you only need to do this on your local computer. If you need to distribute your solution then you could use a batch file or PowerShell file to open a specific browser.
To create a batch file, just open a text editor and enter the following (this will open Firefox in this case):
start "firefox.exe" "path to your html file goes here"
Save that as a file with a .bat extension, such as openmyhtml.bat, and then you can just double click that file to open your HTML file in Firefox.
To accomplish the same in PowerShell, open a text editor and enter the following:
Start-Process "firefox.exe" "path to your html file goes here"
Save that with a .ps1 extension, such as openmyhtml.ps1, and then you can double-click that.
Batch files are more universally supported, so that's probably your best bet, unless there's a specific reason you'd want to use PowerShell.
After further investigating the file, when opening the shortcut it showed the incorrect path to the file in the browser. I dropped the file in chrome directly to see the path is detected and set that in the target. It is now working. Thank you both
I was using Vimperator so far that supported the keybinding C-i to open up Emacs (or whatever editor) so you can continue writing your text there. That was accomplished by creating a temporary file, putting the text you had so far in there, invoking the editor with that file as an argument and when the editor process died it would read the contents of the temporary file back into the textbox. Is that possible in Chrome or in Firefox's WebExtensions API, and if so how?
This is doable with the native messaging API: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Native_messaging
I created a simple demo extension a while back that does a very limited verstion of what you're asking about here: https://github.com/aswan/connectNative-example
I am using Macvim with Janus build. I have installed it just now. I have opened a project by
mvim <project-name>
But problem is that while I am double clicking a file on left hand side project explorer window, it keep on opening in the same window overriding the earlier opened file. But I want, while I double click a file it should open in a new tab.
So I am asking if anyone can help me to fix that. Thanks in advance.
NERDTree opens files in a new buffer because you are supposed to use tabs in vim in a different way. You might want to read :help buffers
I am developing a web application in which I implemented the help.chm file.
My question is:
How to open the chm help file by using a hyperlink in my web application without a download dialog box?
You can't and you shouldn't. A chm is a file archive that requires a separate viewer, it isn't rendered directly inside the browser.
There are also security considerations with these files, so with certain versions of Windows you cannot open them from a remote (including network) location - they must be opened from the local machine (IIRC this is on WinXP SP2+, Vista and Win 7).
Do you know what is, in fact, a CHM file ? It's a set of html files compiled in a big archive. So, the simplest solution to open those files without showing the "download dialog", is to not package your html files as chm, but to left them on your web site, and make classical static links to them.