Search found 391 matches

by AlphaBravo
Today, 15:55
Forum: Ask For Help
Topic: Kindly help me to modify these COM Object Codes to import specific text file into MS Excel?
Replies: 5
Views: 56

Re: Kindly help me to modify these COM Object Codes to import specific text file into MS Excel?

Edited : xl := ComObjActive("Excel.Application") QT := xl.ActiveSheet.QueryTables.Add(Connection:= "TEXT;C:\Users\htc\Desktop\important_data.txt", Destination:=xl.Range("$A$1")) QT.Name := "important_data" QT.FieldNames := True QT.RowNumbers := False QT.FillAdjacentFormulas := False QT.PreserveForma...
by AlphaBravo
Today, 12:11
Forum: Ask For Help
Topic: Kindly help me to modify these COM Object Codes to import specific text file into MS Excel?
Replies: 5
Views: 56

Re: Kindly help me to modify these COM Object Codes to import specific text file into MS Excel?

question 1: How would you do open a text file to an existing sheet manually?
question 2: Please elaborate why opening into an new workbook then copy/paste is not good enough?
by AlphaBravo
Yesterday, 12:37
Forum: Ask For Help
Topic: Kindly help me to modify these COM Object Codes to import specific text file into MS Excel?
Replies: 5
Views: 56

Re: Kindly help me to modify these COM Object Codes to import specific text file into MS Excel?

Code: Select all

XL:=ComObjActive("excel.application")
wb := xl.ActiveWorkbook
FullFileName:="C:\Users\htc\Desktop\important_data.txt"
XL.Application.Workbooks.OpenText(FullFileName)
wb2 := xl.ActiveWorkbook
wb2.Sheets(1).Cells.Copy(wb.Sheets(3).Range("A1"))
wb2.Close(False)
wb.Sheets(3).activate
by AlphaBravo
Yesterday, 11:35
Forum: Ask For Help
Topic: Zip / UnZip using native tools
Replies: 3
Views: 58

Re: Zip / UnZip using native tools

You may use PowerShell Input_Folder = C:\PDF Output_Folder = C:\PDF.zip ; Zip RunWait PowerShell.exe -NoExit -Command Compress-Archive -LiteralPath '%Input_Folder%' -CompressionLevel Optimal -DestinationPath '%Output_Folder%',, Hide ; Extract RunWait PowerShell.exe -NoExit -Command Expand-Archive -L...
by AlphaBravo
07 Nov 2018, 20:37
Forum: Ask For Help
Topic: simplify stuff in script by having a variable in variable
Replies: 4
Views: 125

Re: simplify stuff in script by having a variable in variable

Code: Select all

loop, 8
	guicontrol, move, arxy%A_Index%, % "x" X%A_Index% " y" Y%A_Index% 
by AlphaBravo
31 Oct 2018, 13:54
Forum: Ask For Help
Topic: Parsing #s within Excel and then pasting into 3rd party application
Replies: 7
Views: 100

Re: Parsing #s within Excel and then pasting into 3rd party application

Clipboard := "1848 395 269 416 628 1848 1076"
MsgBox % RegExReplace(Clipboard, "\h+", "`r`n")
by AlphaBravo
30 Oct 2018, 13:13
Forum: Ask For Help
Topic: Parsing #s within Excel and then pasting into 3rd party application
Replies: 7
Views: 100

Re: Parsing #s within Excel and then pasting into 3rd party application

That's awesome man! Is there a way to put an extra blank line between row 4 and row 5 and also have the #s not have any decimal points after?
Updated above
by AlphaBravo
30 Oct 2018, 12:48
Forum: Ask For Help
Topic: Parsing #s within Excel and then pasting into 3rd party application
Replies: 7
Views: 100

Re: Parsing #s within Excel and then pasting into 3rd party application

have only one instance of Excel running and try this:
Hotkey is F1
xl := ComObjActive("Excel.Application")
return

F1::
res := ""
for cell in xl.Range("C2:L2").cells
{
res .= "Row " A_Index " = " cell.text "`r`n"
if (a_index = 4)
res .= "`r`n"
}
MsgBox % res
return
by AlphaBravo
29 Oct 2018, 11:01
Forum: Ask For Help
Topic: Excel-COM - Filter for several words
Replies: 3
Views: 95

Re: Excel-COM - Filter for several words

try this: [code]xl := ComObjActive("Excel.Application") ; Connection to currently active Excel instance ws := xl.ActiveSheet ; Active worksheet MyRange := ws.Range("A1:C18") ; define your filter range A1:C18 is just an example NextRow := RegExReplace(MyRange.address, ".*\$") +1 ; next row return ;--...
by AlphaBravo
23 Oct 2018, 20:22
Forum: Ask For Help
Topic: "wait" function in script
Replies: 3
Views: 96

Re: "wait" function in script

I am not sure I understand what you're asking but look at input
by AlphaBravo
16 Oct 2018, 20:58
Forum: Ask For Help
Topic: Move files based on date/time created
Replies: 2
Views: 72

Re: Move files based on date/time created

here is something to fiddle with SrcFolder := A_Desktop DestFolder := "c:\" SetTimer, Timer, 10000 ; 10 second timer return Timer: Loop, Files, % SrcFolder "\*.avi" ; assuming avi files type { file := A_LoopFileFullPath ; save file full path SubFolder := DestFolder "\" SubStr(A_LoopFileTimeModified,...
by AlphaBravo
09 Oct 2018, 10:40
Forum: Ask For Help
Topic: removing double blank lines using regex
Replies: 3
Views: 64

Re: removing double blank lines using regex

Code: Select all

ClipBoard := RegExReplace(ClipBoard, "\R(?=\R{2,})")
; or
ClipBoard  := RegExReplace(ClipBoard , "\R\R\K\R+")
by AlphaBravo
26 Sep 2018, 11:03
Forum: Ask For Help
Topic: Reverse or Backward InStr Topic is solved
Replies: 3
Views: 106

Re: Reverse or Backward InStr Topic is solved

you may also use Regex if you're familiar with it. the first one maybe a bit faster FilenameToSearchFor = doom.exe RegExMatch(FileCollection, "is)Listing archive:([^L]|L(?!isting archive:))*?" FilenameToSearchFor, m) MsgBox % m RegExMatch(FileCollection, "is)(Listing archive:)(.(?!(?1)))*?" Filename...
by AlphaBravo
26 Sep 2018, 10:25
Forum: Ask For Help
Topic: how to update another dropdownlist value depending on another dropdown list value
Replies: 3
Views: 70

Re: how to update another dropdownlist value depending on another dropdown list value

gui Add, DropDownList, vList1 gList1 x+0 y1 w110, xxxxx||yyyyy|zzzzzz ; dropdownlist A gui Add, DropDownList, vList2 gList2 x+5 y1 w110 AltSubmit, option 1||option 2|option 3 ; dropdownlist B gui show return list1: gui submit , nohide msgbox %list1% return list2: gui submit , nohide GuiControlGet, ...
by AlphaBravo
25 Sep 2018, 23:29
Forum: Ask For Help
Topic: how to update another dropdownlist value depending on another dropdown list value
Replies: 3
Views: 70

Re: how to update another dropdownlist value depending on another dropdown list value

gui Add, DropDownList, vList1 gList1 x+0 y1 w110, xxxxx||yyyyy|zzzzzz ; dropdownlist A gui Add, DropDownList, vList2 gList2 x+0 y1 w110 AltSubmit, option 1||option 2|option 3 ; dropdownlist B gui show return list1: return list2: GuiControlGet, var,, list2 GuiControl, Choose, list1, % var return
by AlphaBravo
25 Sep 2018, 12:06
Forum: Ask For Help
Topic: Find matching words between n number of variables
Replies: 5
Views: 122

Re: Find matching words between n number of variables

Code: Select all

for word in matching
{
	needle .= word "|"
	output .= word " "
}
needle := "i)\b(" Trim(needle, "|") ")\b
by AlphaBravo
25 Sep 2018, 09:29
Forum: Ask For Help
Topic: Find matching words between n number of variables
Replies: 5
Views: 122

Re: Find matching words between n number of variables

Here you go, also made few changes initial = (A1 - Superior lateral to medial MEGA ,[P-10]) var1 = (A2 - SUPERIOR MEGA [P-10]) var2 = (A3 - SUPERIOR MEGA [P-10]) var3 = (Axx - SUPERIOR MEGA [P-10]) final= (A4 - SUPERIOR MEGA [P-10]) vars := ["initial", "final"] matching := [] while (var%A_Index% <> ...
by AlphaBravo
24 Sep 2018, 19:26
Forum: Ask For Help
Topic: Find matching words between n number of variables
Replies: 5
Views: 122

Re: Find matching words between n number of variables

this is based on the assumption that all n number of variables are named var1, var2, etc., they are all in sequence and all contain something. initial = (A1 - Superior lateral to medial MEGA ,[P-10]) var1 = (A2 - SUPERIOR MEGA [P-10]) var2 = (A3 - SUPERIOR MEGA [P-10]) var3 = (Axx - SUPERIOR MEGA [P...
by AlphaBravo
23 Sep 2018, 19:54
Forum: Ask For Help
Topic: Use Continue in Repeated Code
Replies: 2
Views: 64

Re: Use Continue in Repeated Code

Please don't start a new post for the same question
https://autohotkey.com/boards/viewtopic.php?f=5&t=56188

Maybe you're looking for something like :

Code: Select all

loop 10
{
	if namedLoop(A_Index)
		continue
	MsgBox % A_Index
}
	
namedLoop(i){
	if (i < 5)
		return 1
}
by AlphaBravo
22 Sep 2018, 19:14
Forum: Ask For Help
Topic: Super easy help for noob
Replies: 1
Views: 54

Re: Super easy help for noob

Code: Select all

if !GetKeyState("CapsLock", "T")
	return
; your code here will execute only if capslock is off

Go to advanced search