I want to create the folder if it is not present in downloads folder while taking the screenshot and save in that folder respective.
I tries this:
VERSION BUILD=8871104 RECORDER=FX
TAB T=1
TAB CLOSEALLOTHERS
SET !TIMEOUT_PAGE 120
SET !DATASOURCE W:\test.csv
SET !DATASOURCE_COLUMNS 1
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO={{!COL1}}
WAIT SECONDS=2
SET VAR1 {{!COL1}}
SCREENSHOT TYPE=Page FOLDER=C:\Users\kinjal.gada\Documents\iMacros\Downloads\{{!NOW:ddmmyyyy}} FILE={{VAR1}}
but this gives an error
RuntimeError: Path C:\Users\Documents\iMacros\Downloads\+23012015 does not exists, line 14 (Error code: -932)
Is there any way to make the folder at runtime?
thanks
Related
Being relatively new to Splunk (ver 6) and even newer to Reg-ex, I have log files that I and trying to index that have a header than I need to ignore. There are 6 header lines. The first 4 all begin with * and the last two are blank lines. I'm assuming they are just carriage returns. I'm looking for help with the regular expression that will ignore these lines in the transforms.conf file when adding the data. Below is an example from the log file I want to add:
*******************************
*** This is a Header ***
*** 07:32:06 Tue Jan 07 ***
*******************************
Jan-07 07:32:06 SERVERNAME:somedatainfo
Jan-07 07:32:06 SERVERNAME:moredatainfo
On the forwarder or indexer you can set the sourcetype for the file that is being monitored.
# in inputs.conf
[monitor:///path/to/your/file]
sourcetype=new_sourcetype
On the indexer, you can get rid of the first lines like this:
# in props.conf
[new_sourcetype]
TRANSFORMS-test=ignore_header
#in transforms.conf
[ignore_header]
REGEX=^\*\*\*+
DEST_KEY=queue
FORMAT=nullQueue
I have been using mutt for quite some time but I have reconfigured it for use with offlineimap. The problem is now that when I reply to an email the header fields "To, From, CC Subject ..." are left empty and it is impossible to send the reply. I have to paste the fields in by hand which is kind of annoying (what do we have computers for?).
Any hints, for I have not got a clue how to debug this problem.
Thanks
my muttrc
======================================================
# Boring details
set realname = "Ivo Keel"
set from = "<myid>#gmail.com"
set use_from = yes
# fills headers on reply
set fast_reply = yes
set envelope_from ="yes"
# Check for new mail in the folders
set mail_check=60 # mutt checks for new mails on every keystroke
# but not more often then once in 5 seconds
set beep_new = yes
# Use a signature
set signature="~/.signature"
# mailcap
set mailcap_path="~/.config/mutt/mailcap"
# Use msmtp rather than sendmail. Check that
# the path is correct for your system:
set sendmail="/usr/bin/msmtp"
# If not set in ~/.bashrc:
set spoolfile = "~/.maildir/"
set print_command="/usr/bin/muttprint %s"
set print_split set print="yes"
set sleep_time = 0
set reply_to = yes
#======================================================#
# Folders
set mbox_type=Maildir
#set mbox="~/.maildir/"
set folder="~/.maildir/" # Local mailboxes stored here
mailboxes =c32t/inbox =hibury/inbox =inbox
set record="+/hibury/sent/" # Where to store sent messages
set postponed="+/hibury/drafts/" # Where to store draft messages
#set move=no # Don't move mail from spool
set mask="!^\\.[^.]"
#======================================================#
# What to show and order of headers
ignore *
unignore Date: From: User-Agent: \
Cc: Reply-To: Subject: Mail-Followup-To:
hdr_order Date From Subject To CC
set sort=threads
set sort_browser=reverse-date
set sort_aux=reverse-last-date-received
#======================================================#
# which editor do you want to use?
# vim of course!
set editor="vim"
set edit_headers=yes # See the headers when editing
#======================================================#
# Aliases
set alias_file = ~/.config/mutt/alias # In their own file
source ~/.config/mutt/alias # Source them
set sort_alias=alias # Sort alphabetically
# Odds and ends
set markers # mark wrapped lines of text in the pager with a +
set smart_wrap # Don't wrap mid-word
set pager_context=5 # Retain 5 lines of previous page when scrolling.
set status_on_top # Status bar on top.
push <show-version> # Shows mutt version at startup
set duplicate_threads = yes
#email addresses with esc-1 and esc-2. Sets the status bar at the
# top too so you know which from address you're using
set mailcap_path = ~/.config/mutt/mailcap auto_view text/html
set query_command="abook --mutt-query '%s'"
# Pager View Options ---------------------------------
set pager_index_lines = 10 # number of index lines to show
set pager_context = 3 # number of context lines to show
set pager_stop # don't go to next message automatically
set menu_scroll # scroll in menus
set tilde # show tildes like in vim
unset markers # no ugly plus signs
set quote_regexp = "^( {0,4}[>|:#%]| {0,4}[a-z0-9]+[>|]+)+"
alternative_order text/plain text/enriched text/html
bind pager R group-reply
# View attachments properly.
bind attach <return> view-mailcap
#Skip some options
set include=yes
set forward_quote=yes
set copy=yes
set delete=yes
set confirmappend=no
#--------------------------------------------------------------------------
# Other configuration files
#--------------------------------------------------------------------------
#source ~/.config/mutt/account_hooks
#source ~/.config/mutt/folder_hooks
source ~/.config/mutt/colors
source ~/.config/mutt/sidebar
#source ~/.config/mutt/gpg
source ~/.config/mutt/macros
source ~/.config/mutt/lists
source ~/.config/mutt/alias
END of muttrc
Allowing mutt to automatically fill the From: header is done by adding:
set use_from = yes
to your .muttrc and allowing it to automatically fill the To: and Subject: header can be done by putting:
set fast_reply = yes
in your .muttrc. Those two options are very common, if you don't have them, you should consider looking at some of the .muttrc configurations available online to find other classical options (noconfirmappend, reverse_alias, sort=threads, etc.) which will greatly improve your mutt experience.
The CC: header will not be filled if you use the "reply" command instead of the "group-reply" one (the default keyboard shortcut is g).
I had this problem, but it turned out to be a problem with my workflow (the buggy system located between the keyboard and chair). Perhaps this was also your issue?
When I reply to a message in Mutt, Mutt drops me into a text editor session with pre-populated reply headers, like this:
1: From: Steve HHH <steve#hhhdomain.com>
2: To: Jonny Appleseed <jonny#hhhdomain.com>
3: Cc:
4: Bcc:
5: Subject: Re: Good morning
6: Reply-To:
7: In-Reply-To: <CABSQ23i=yOa3GUwvbUPmHE+_i1_gLw#mail.gmail.com>
8:
9: On Mon, Sep 29, 2014 at 11:52:04AM -0700, Jonny Appleseed wrote:
10: > LOL
My mistake was to start typing the reply on line one. Mutt needs those headers on lines 1-7 (and the newline on line 8?) to stay intact. If I enter my reply on line nine, the reply fields are correctly populated when I exit the editor and arrive at the Compose menu.
MainSection of .nsi file contains the files name which are bundled along with the installer.
I need to make a file which should not get bundled when install type equals normal and that file should get bundled when type equals costume.
Section "MainSection" SEC01
- SetOutPath "$INSTDIR"
- SetOverwrite ifnewer
* if (installtype==custom)
* File "IncludeThisFile"
SectionEnd
How to achieve above in nsis.help is much appreciated!!
You usually just put optional things in another section but you can also do what you want:
!include LogicLib.nsh
!include FileFunc.nsh
var IsSpecialMode
Function .onInit
StrCpy $IsSpecialMode 0
${GetParameters} $0
ClearErrors
${GetOptions} $0 "/includespecial" $1
${IfNotThen} ${Errors} ${|} StrCpy $IsSpecialMode 1 ${|}
FunctionEnd
Page InstFiles
Section
SetOutPath "$instdir"
${If} $IsSpecialMode <> 0
File "${__FILE__}"
${EndIf}
SectionEnd
..and then run MySetup.exe /includespecial
Here's my .vimrc
syntax on
set number
set nowrap
set autoindent
" configure tags - add additional tags here or comment out not-used ones
set tags+=~/.vim/tags/cpp_files
set tags+=~/.vim/tags/cpp_src/
set tags+=~/.vim/tags/qt
" build tags of your own project with Ctrl-F12
map C-F12 :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .CR
" OmniCppComplete
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
let OmniCpp_MayCompleteDot = 1 " autocomplete after .
let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest,preview
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main
autocmd FileType cpp set omnifunc=cppcomplete#CompleteCPP
I've followed this guide for getting it to work, but nothing really happens. As you can see I've tried a variation of autocmd and au type commands for this to work, but nothing actually happens. Am I doing something wrong? The paths in the set tags* lines are correct...
This line should be the one that causes the problem:
autocmd FileType cpp set omnifunc=cppcomplete#CompleteCPP
You see, you have the following commands:
au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main
autocmd FileType cpp set omnifunc=cppcomplete#CompleteCPP
The thing is, the first autocommand is executed when entering a buffer with the extension "cpp" or "hpp". The second is executed when the filetype is set to cpp, which always happens after opening the buffer. It doesn't even matter how you order them, the second one will always be executed after the first one, so the omnifunc will always be set to cppcomplete#completeCPP, and you don't want that. You should replace both of these lines with this one line:
autocmd FileType cpp set omnifunc=omni#cpp#complete#Main
Just in case, if it still doesn't work, try only this instead:
au BufNewFile,BufRead,BufEnter *.cpp,*.hpp set omnifunc=omni#cpp#complete#Main
For future debugging issues, a small tip: you can check the value of omnifunc by executing set omnifunc. That way, you can check if the completion function really is the one you want.
I'm running VisualSVN on a Windows server.
I'm trying to add a post-commit hook to update our staging project whenever a commit happens.
In VisualSVN, if I type the command in the hook/post-commit dialog, everything works great.
However, if I make a batch file with the exact same command, I get an error that says the post-commit hook has failed. There is no additional information.
My command uses absolute paths.
I've tried putting the batch file in the VisualSVN/bin directory, I get the same error there.
I've made sure VisualSVN has permissions for the directories where the batch file is.
The only thing I can think of is I'm not calling it correctly from VisualSVN. I'm just replacing the svn update command in the hook/post-commit dialog with the batch file name ("c:\VisualSVN\bin\my-batch-file.bat") I've tried it with and without the path (without the path it doesn't find the file at all).
Do I need to use a different syntax in the SVNCommit dialog to call the batch file? What about within the batch file (It just has my svn update command. It works if I run the batch file from the command line.)
Ultimately I want to use a batch file because I want to do a few more things after the commit.
When using VisualSVN > Select the Repo > Properties > Hooks > Post-commit hook.
Where is the code I use for Sending an Email then running a script, which has commands I want to customize
"%VISUALSVN_SERVER%\bin\VisualSVNServerHooks.exe" ^
commit-notification "%1" -r %2 ^
--from support#domainname.com --to "support#domainname.com" ^
--smtp-server mail.domainname.com ^
--no-diffs ^
--detailed-subject
--no-html
set PWSH=%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe
%PWSH% -command $input ^| C:\ServerScripts\SVNScripts\post-commit-wp.ps1 %1 %2
if errorlevel 1 exit %errorlevel%
The script file is located on C:\ServerScripts\SVNScripts\
post-commit-wp.ps1 and I pass in two VisualSVN variables as %1 and %2
%1 = serverpathwithrep
%2 = revision number
The script file is written in Windows PowerShell
# PATH TO SVN.EXE
$svn = "C:\Program Files\VisualSVN Server\bin\svn.exe"
$pathtowebistesWP = "c:\websites-wp\"
# STORE HOOK ARGUMENTS INTO FRIENDLY NAMES
$serverpathwithrep = $args[0]
$revision = $args[1]
# GET DIR NAME ONLY FROM REPO-PATH STRING
# EXAMPLE: C:\REPOSITORIES\DEVHOOKTEST
# RETURNS 'DEVHOOKTEST'
$dirname = ($serverpathwithrep -split '\\')[-1]
# Combine ServerPath with Dir name
$exportpath = -join($pathtowebistesWP, $dirname);
# BUILD URL TO REPOSITORY
$urepos = $serverpathwithrep -replace "\\", "/"
$url = "file:///$urepos/"
# --------------------------------
# SOME TESTING SCRIPTS
# --------------------------------
# STRING BUILDER PATH + DIRNAME
$name = -join($pathtowebistesWP, "testscript.txt");
# CREATE FILE ON SERVER
New-Item $name -ItemType file
# APPEND TEXT TO FILE
Add-Content $name $pathtowebistesWP
Add-Content $name $exportpath
# --------------------------------
# DO EXPORT REPOSITORY REVISION $REVISION TO THE ExportPath
&"$svn" export -r $revision --force "$url" $exportpath
I added comments to explain each line and what it does. In a nutshell, the scripts:
Gets all the parameters
Build a local dir path
Runs SVN export
Places files to a website/publish directory.
Its a simple way of Deploying your newly committed code to a website.
Did you try to execute batch file using 'call' command? I mean:
call C:\Script\myscript.bat
I was trying the same thing and found that you also must have the script in the hooks folder.. the bat file that is.