Programming Languages-Other

19K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hello experts,
I have the following script which allows me to zip file with 7-zip:
;====================================
; 7zip
;====================================

#IfWinActive,ahk_class CabinetWClass
+F7::
Send, +{F10}
Sleep, 100
Send, 7
Return
#If

Open in new window

2019-09-13_16h25_09.pngMost of the time it works however sometimes,
Send, 7 

Open in new window

is not performed and I just get:
2019-09-13_16h26_40.pngIf you have recommendations on this, please let me know.
0
OWASP: Threats Fundamentals
LVL 13
OWASP: Threats Fundamentals

Learn the top ten threats that are present in modern web-application development and how to protect your business from them.

Hello experts,
I have the following AutoHotkey reported at: Question 29156945 which allows me to remove two consecutive blank  lines and cr lf characters:

;====================================
;Remove two consecutive blank lines
;====================================

^!Space::
  ; clipboard:="" ; Joe commented out - not needed because Ctrl+c replaces Clipboard
  Send, ^a ; Luis commented out because he prefers to select the block
  Send, ^c
  ClipWait,1 ; Joe added - good practice to do a ClipWait after Ctrl+c
  If (ErrorLevel=1)
  {
    MsgBox,4144,Error,No text appeared on clipboard after waiting for one second
    Return
  }
  clipboard:= RegExReplace(clipboard, "\R(?=\R{2,})") ;find 2 consecutive blank lines
  sleep 100
  ; Joe: see if last two chars are CR and/or LF
  LastChar:=SubStr(Clipboard,0,1)
  If ((LastChar="`r") or (LastChar="`n"))
    StringTrimRight,Clipboard,Clipboard,1
  If ((LastChar="`r") or (LastChar="`n"))
    StringTrimRight,Clipboard,Clipboard,1
  Send, ^v
  Return

Open in new window


I was wondering if there is a way to take it as a reference to remove 2 or more blank consecutive lines?
Thank you for your help.
0
Hello experts,
I would like to automate the following daily process through AutoHotkey:
Every time when I made a copy paste with multiple lines like this:
line 1
line 2
line 3
line 4
line 5
line 6
line 7
line 8
line 9
I need to manually move up from line 9 to line 1 (initial line of the copy-paste).
The idea is to:
Perform the copy-paste:
Send keys to move up automatically to the first string of the clipboard pasted.
In my example I expect to move the cursor from 9, last string of the clipboard to the first string of the clipboard l of line 1.
Obviously the AutoHotkey should be able to move up no matter the number of lines involved by the copy-paste
I expect the AutoHotkey to work on Notepad++, Word, Outlook EE block description and Excel if possible (:-))
If you have questions, please contact me.
Thank you for your help.
0
Hello experts,
I have the following AutoHotkey script reported at: https://www.experts-exchange.com/questions/29157223/Autohotkey-assign-EE-link-option.html
;====================================
;Send blocks comment
;====================================

:*:blc::
If ((WinActive("ahk_exe excel.exe")) or (WinActive("ahk_exe vbsedit.exe")))
  CommentBlock:="' *************************************************************************`n"
              . "' Author:`n"
              . "' Creation date:`n"
              . "' Description:`n"
              . "' ***************************************************************************`n"
Else
If (WinActive("ahk_exe notepad++.exe"))
  CommentBlock:="Rem ======================================================================`n"
              . "Rem Author:`n"
              . "Rem Creation date:`n"
              . "Rem Description:`n"
              . "Rem ======================================================================`n"
Else
If (WinActive("ahk_exe powershell_ise.exe"))
 CommentBlock:="# ===========================================================================`n"
              . "# Author:`n"
              . "# Creation date:`n"
              . "# Description:`n"
              . "# ===========================================================================`n"
Else
If (WinActive("ahk_exe sciTE.exe"))
 CommentBlock:="; 

Open in new window

0
Hello experts,
I have the following script reported at:
I would like to take as a reference to close all active process.
WinGet,AllWindows,List
Loop,%AllWindows%
{
  CurrentID:=AllWindows%A_Index%
  WinGetClass,CurrentClass,ahk_id %CurrentID%
  If (CurrentClass="CabinetWClass")
    WinClose,ahk_id %CurrentID%
}
Return

Open in new window

This AutoHotkey will be used in case of emergency.
Thank you for your help.
0
Hello experts,
I am looking for an AutoHotkey that allows me to close all windows explorer windows (active, and minimized one's).
If you have advice on this please let me know.
Thank you for your help.
0
Hello experts,
I was wondering how to set up an AutoHotkey to send comment block based on activewindows.
I need to send:
'-- ======================================================================
'-- Author:
'-- Creation date:
'-- Description:
'-- ======================================================================

Open in new window

If Ssms.exe process name is active.


Rem ======================================================================
Rem Author:
Rem Creation date:
Rem Description:
Rem ======================================================================

Open in new window

If Notepad++ process name is active.

'*************************************************************************
' Author:
' Creation date:
' Description:
'***************************************************************************

Open in new window


If excel.exe process or vbsedit.exe process name is active.

#===========================================================================
# Author:
# Creation date:
# Description:
#===========================================================================

Open in new window


If powershell_ise.exe is active.

I attached the various windows related to each process.
If you have questions, please contact me.
VBA.png
Ssms.png
VBS.png
Notepadplusplus.png
Powershell.png
0
Hello experts,
I am trying to run spotify with AutoHotkey.
spotify.exe is located at:
%userprofile%\AppData\Local\Microsoft\WindowsApps

Open in new window

I would like to declare Spotify as variable and run it through:

#!t::
If (FileExist(%Spotify%))
Run, %Spotify%
Else
 MsgBox,4112,Error, Spotify doesn't exists on your system.
Return
How should I declare:
Spotify:=""
My attempt:
Spotify:=%userprofile% . "\AppData\Local\Microsoft" . "\spotify.exe"

Open in new window

Thank you for your help.
0
Hello experts,
I am looking for an AutoHotkey to easily open/edit document based on extension.
The idea is the following:
Send F10+Tab 3 if file has ahk extension and just send F10 +Tab 2 if file finishes with other extension.
Option 1 will allows me to open/edit file with my SciTE4AutoHotkey and option 2 to open/edit with Notepad++. If there is better way to do this, please let me know.
Option 1:
edit-ahk.pngOption2:
edit-notepad-plus-plus.pngThank you for your help.
0
Hello experts,
I frequently use gmail and google drive.
I was wondering how to set up some ahk which are not part of default shortcuts keyboard proposed.
1)      Be able to download a document on drive
The following combination works but I don't know if there is an smart way to do this: {Shift}+{F10 }+ {Arrow up 2}+{Enter}
2)      Be able to download an attached file from gmail:
The following combination works but I don't know if there is an smart way
3)      Be able to attach a file when composing a new e-mail
The following combination works but I don't know if there is an smart way to do this: {Tab 7}+{Enter}
4)      Be able to open received message in a new windows
Thank you for your help.
0
Angular Fundamentals
LVL 13
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Hello experts,
I was wondering how to create an AutoHotkey to perform this daily action:
Copy path of word, excel, powerpoint document.
The idea is the following:
I am working on an office document. I launch the related AutoHotkey through shortcut set up to recover path to clipboard and then paste the clipboard if I want to attach it instead of closing the file and trying to find where is located the document.
Here is the option available in word:
It can be activated through Alt + F
Copy-path.pngI don't know how to select this copy path button through the keyboard.
If you have advice or an smart way to cover this daily action please let me know.
0
Hello experts,
I am trying to find a swift way to assign EE link option through AutoHotkey.
Here is my attempt however I don't know what is wrong.

!^u:: ;URL
Send, ^x
Sleep, 50
ClipWait,1
If (ErrorLevel=1)
{
  MsgBox,4144,Error, No text appearing after one second
  Return
}
URL:=chr(34) & Clipboard & chr(34) 
LinkPrefix:="[url="
LinkSuffix:="url][/url]"
LinkURL:=%LinkPrefix% %URL% %LinkSuffix%
Send, %LinkURL%
Sleep, 50
Send, {End}
Sleep, 50
Return

Open in new window


Could you please help to revise the script?
Thank you for your help.
0
Q: How to unite interaction columns from R emmeans package dynamically generated in R-Shiny?

I am building an R-Shiny app where I need to wrangle the output from the 'emmeans' package. However, in this interactive environment where many factors may be entered by the user, the single-tibble 'emmeans' output structure will vary with each run depending on the selections made. It could go from having only a single main effect to having multiple 3-way interactions (mixed with main effects and 2-way interactions) arranged in a wide format way.

For instance, assuming the user selects FctrA (with levels A and B) and FctrB (with levels C, D, and E), the interaction FctrA_FctrB will be automatically considered as well. When (~FctrA, ~FctrB, ~FctrA+FctrB) are submitted to 'emmeans', the output tibble is structured as follows:

- the leftmost side of the tibble contains FctrA results (levels, estimates, SE, df, CLs);
- the certermost block contains FctrB results;
- the rightmost side of the tibble contains the interaction results

So far so good except that FctrA levels columns is a single column, FctrB levels column is also a single column, but the interaction portion has its levels split into two columns, one with FctrA and one with FctrB.

The above issue impairs gathering, spreading, stacking of the separate blocks owing to the dimensional discrepancy.

My question is: How can I tell Shiny ('tidyr') to find those split interaction columns and concatenate them …
0
Hello experts,
When I create dummy files and revise my procedure I always take the question number related to the question.
I was wondering if there is a way to select numeric from an URL as reported bellow:
2019-08-31_18h31_07.png
I would like to proceed like this:
1-Select URL bar with default chrome shortcut: ctrl + l
2-Launch the ahk to copy the sequence number of the URL
 

If you have questions, please contact me.
Thank you for your help.
0
Hello experts ,
I am looking for a procedure to duplicate a word from left to the right or right to the left.
Here is my attempt:
#w::
SendInput ^{Left}+^{Right}^c
ClipWait, 1
Send, {Right}+{Space}^v
Return

Open in new window

The problem with it is that it creates an extra space between word and duplicated ex : word    word    
Do you know if there is a better way to duplicate word from left to the right or right to the left without creating space?
Thank you for your help.
0
In Lotus script, I'd like to get text list data in a field as an array variable. The item num of the list data  is not fixed. I look for the way to check the item num by lotus script but I couldn't. Is there any way except for loop check?
0
In Notes and Domino, I'd like to know the max string length for view SELECT and search query. In my application, it might be very very complex. So I'd like to know the max size.
0
Hello Experts, ,
I am trying to set up a shortcut to open file location as reported bellow.
File-location.pngWhen I launch manually the following keys it works Shift + F10 + down arrow+ enter
However when I send through ahk it doesn’t.
^F8::
Send, +{F10}
;~ Sleep, 5
;~ Send, {Down}{Enter}
Return

Open in new window

Any idea?
Thank you for your help.
Regards,
Luis.
0
Hello experts,
I would like to send specific specific keys exclusively for windows explorer example:
zip file
+F7::
Send, +{F10}
Sleep, 5
Send, 7 

Open in new window


The idea is to add a loop if windows explorer windows is open if not don't send the key.
The problem is that I cannot loop on the windows title as it is not always the same. Either on windows ID.
Do you know how can I manage this?
Thank you for your help.
0
CompTIA Security+
LVL 13
CompTIA Security+

Learn the essential functions of CompTIA Security+, which establishes the core knowledge required of any cybersecurity role and leads professionals into intermediate-level cybersecurity jobs.

Hi everyone,

I am trying to verify number of files received as well as records in each ASCII pipe-delimited file (file<electronic_company><electronic_device>.txt) by using its associated tally file (file<electronic_company><electronic_device>tally.csv) in SAS?  

ASCII pipe-delimited file (file<electronic_company><electronic_device>.txt) - each files contains 100s of records
Associated tally file (file<electronic_company><electronic_device>tally.csv) - contains a total record number of records in each associated ASCII pipe-delimited file

I have already done the same verification in Bash scripting in Unix but my assumption is the number of files verification can be also done in SAS as well as the number of records verification in each pipe-delimited file can be accomplished by reading each tally file (file<electronic_company><electronic_device>tally.csv) that is associated with each file (file<electronic_company><electronic_device>.txt) received.  Does anyone know what is the best practice in SAS verifiyng number of files and number of records in each file?  
Any suggestions/examples would be greatly appreciated.

Thank you!
0
Hello experts,
I use the following autohotkey to send user and password.
uid := "UserName"
pw := "Password"
!m::
Send, %uid%{Tab}%pw%{Enter}

Open in new window

I would like to enhance it by adding an error and winwait loop
The idea is to have with the same shortcut key:
1-Open the site reported in ahk
2-Wait till reference windows is active
3-Send user and password

Example of winwait active.
WinWaitActive, Untitled - Notepad, , 2
if ErrorLevel
{
    MsgBox, WinWait timed out.
    return
}
else
    WinMinimize  ; minimize the window found by WinWaitActive.

Open in new window


Complementary question: How I identify the id or name related of an url to set up winwaitactive loop?
Thank you in advance for your help.
0
Hello experts,
I use the following procedure reported at: https://www.experts-exchange.com/questions/29151200 to go to a line and select text from current position:
; Joe Winograd 8-Jul-2019
Version:="1.2"
#Warn,UseUnsetLocal ; warning on uninitialized variables
#NoEnv ; avoid checking empty variables to see if they are environment variables
#SingleInstance Force ; replace old instance immediately
SetBatchLines,-1 ; run at maximum speed
SendMode Input ; faster and more reliable
TrayIconFile:="c:\Windows\System32\shell32.dll" ; use an icon from shell32.dll for the system tray
TrayIconNum:="-16775" ; clipboard icon
Menu,Tray,Icon,%TrayIconFile%,%TrayIconNum% ; display chosen icon in system tray
TrayTip:=A_ScriptName . " Version " . Version . "`nHotkey is Ctrl+F12" ; tray tip showing what the hotkey is
Menu,Tray,Tip,%TrayTip% ; display system tray tip
SetTitleMatchMode,3 ; exact match when looking for NPP GoTo dialog

^F12:: ; hotkey to perform action - this is Ctrl+F12 - use whatever hotkey you want
OldX:=A_CaretX ; get X pos of current text insertion point
OldY:=A_CaretY ; get Y pos of current text insertion point
Send ^g ; run GoTo in NPP
WinWaitActive,Go To... ; wait until GoTo dialog appears
WinWaitNotActive,Go To... ; wait until GoTo dialog disappears
Sleep 50 ; give it time to get to the new line
NewY:=A_CaretY ; get Y pos of new text insertion point
If (OldY=NewY)
{
    MsgBox,4144,Error,New line is same as old line
    Return
}
If (OldY<NewY)

Open in new window

0
Hello experts,
I have the following autohotkey command which allows me to duplicate a line
[Code]
^+y::
Clipboard =
Send, {End}+{Home}^c
ClipWait,1
Send, {Right}+{Enter}^v
Return
[Code]
I would like to apply the same process but instead of duplicating a line duplicate/paste a selected text

The command should do:
1-"Ctrl + c" to copy selected text
2-"Left" to exit selection mode and put the cursor in last line involved by the selection
3-"End" to go to the end line of the cursor
4-"Enter" to go to the beginning of next line
5-"Ctrl + v" to paste text copied in step 1

If you have questions, please contact me.
Thank you in advance for your help.
0
Hello experts,
I use the following autohotkey to open excel (64 bits)
#!e::Run C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE

Open in new window

I have another computer with excel (32 bits)
#!e::Run C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE

Open in new window

The idea is to keep the same autohotkey in both computer.
Is there an easy way to add a loop to check computer if EXCEL.EXE file exists and activate the shortcut?
Thank you in advance for your help.
0
Hello experts,
I have the following command that allows me to open notepad ++.
I was wondering how to send ctrl + n to open a new tab as notepad ++ stock previous tab.
I tried the following but it doesn't work.
Thank you in advance for your help.
#!n:: Run C:\Program Files\Notepad++\notepad++.exe
Sleep 20
#IfWinActive ahk_class Notepad
Send, ^n

Open in new window

Thank you in advance for your help.
0

Programming Languages-Other

19K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.