Search found 288 matches

by hagchr
Mon Oct 07, 2013 7:30 am
Forum: Technical / Scripting
Topic: Excel Sheet Names - How to retrieve
Replies: 2
Views: 2164

Hi, I think you need to change

VBRun>GetXL(xlFile)
to
VBRun>GetXL,xlFile
by hagchr
Thu Oct 03, 2013 1:00 pm
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler of the Week 3
Replies: 21
Views: 15497

Let>InitVal1=13.85
Let>RoundOffset=0.84
mdl>{trunc((%initval1%)-(%roundoffset%))+1}
by hagchr
Wed Oct 02, 2013 7:26 am
Forum: Technical / Scripting
Topic: passing variable to vbscript for outlook
Replies: 3
Views: 3736

I think you need to pass the variable in the sub call (see x in VB part and extra parameter in VBRun call). VBSTART Sub SendOutlookMail(x) Set objOutlook = CreateObject("Outlook.Application") Set objMailItem = objOutlook.CreateItem(0) ' // Option Values for Outlook Object CreateItem( ) are: ' // 0=M...
by hagchr
Mon Sep 30, 2013 3:29 pm
Forum: Technical / Scripting
Topic: Cannot click ENTER on pop-up box
Replies: 5
Views: 4473

Sometimes I have had problems with hidden windows confusing my script. Then I try to look for visible windows only by adding Let>WF_TYPE=2 before the SetFocus. Not sure if the issue here, but maybe worth trying, also adding a wait before the ENTER. Let>WF_TYPE=2 SetFocus>Question -- Webpage Dialog* ...
by hagchr
Sat Sep 21, 2013 10:24 am
Forum: The Water Cooler
Topic: The Unofficial Macro Scheduler Puzzler of the Week 2
Replies: 5
Views: 6414

The variable r is used twice (repeat counter and result of WriteLn) and gets reset to zero in the loop. This leads to a loop doing the same thing each time.
by hagchr
Tue Sep 03, 2013 7:07 am
Forum: Beginners
Topic: String help
Replies: 3
Views: 3842

Small adjustment to cover either of "-", ":", or " ". Since you are new to RegEx, it is very powerful, but you have to be careful how you structure them so you don't get wrong results. The code below would work well for simple strings, starting with the ID. (If you have longer strings with several "...
by hagchr
Thu Jun 13, 2013 3:04 pm
Forum: Beginners
Topic: Print web page to PDF
Replies: 9
Views: 9422

Sometimes I have had problem with hidden windows that could confuse what is in focus. Both SetFocus and WaitWindowOpen have the choice to look for visible windows. Not sure if that is an issue here. I have updated my previous code (below) and it works on my machine without any problem. Day>dd Month>...
by hagchr
Wed Jun 05, 2013 9:39 pm
Forum: Beginners
Topic: Print web page to PDF
Replies: 9
Views: 9422

Hi, I also print to pdf regularly and then to simplify and make my macros more robust I usually set "Adobe PDF" as the default printer. Then it is automatically pre-selected and there is no need for the image recognition. Then for your case it would just be a simple macro like below. (alternatively ...
by hagchr
Sun Jul 17, 2011 7:40 pm
Forum: Beginners
Topic: How to select and "SORT" Excel column with keystro
Replies: 16
Views: 15579

Hi bstafford,

What you can do is:

PRESS F5 (goto/select range in Excel)
Wait>0.2
SendText>A:A (eg to select A column)
Wait>0.2
PRESS ENTER
by hagchr
Sun Jul 17, 2011 3:40 pm
Forum: Beginners
Topic: How to select and "SORT" Excel column with keystro
Replies: 16
Views: 15579

Hi, I am not sure which version of Excel you are using but eg in Excel 2010 you could select a cell in the column you want to sort and then access SORT through the key combinations ALT+A+SA (ascending) ALT+A+SD (descending) (ie you press ALT then can access the menus and submenues through letter com...
by hagchr
Wed Jan 26, 2011 9:02 am
Forum: Technical / Scripting
Topic: MouseMoveRel x,y as variable?
Replies: 5
Views: 4012

Hi! One way would be to split the text in two parts and feed them to the mousemove function. Let>blahblahXY="123, 321" Let>delim1=, Let>delim2=" Separate>blahblahXY,delim1,arrItems StringReplace>arrItems_1,delim2,,arrItems_1 StringReplace>arrItems_2,delim2,,arrItems_2 Trim>arrItems_1,arrItems_1 Trim...
by hagchr
Wed Oct 27, 2010 7:47 pm
Forum: Technical / Scripting
Topic: Issue with Command Locator in v12.1.0
Replies: 0
Views: 2278

Issue with Command Locator in v12.1.0

There seems to be an issue with the help text when you move over commands using the Command Locator. (I see no help text and the old text box still hangs for some time even when I change and move over a different topic, resulting in a "snake" of text boxes).
by hagchr
Tue Oct 19, 2010 3:13 pm
Forum: Technical / Scripting
Topic: Problems with Excel
Replies: 8
Views: 5588

It may also help if you concatenate a " in the beginning and end of your path/file name on each row. (""""" & cellRC & """"") plus the trim mentioned above. (ie just create a second column and have MS run on that one).
by hagchr
Tue Oct 19, 2010 9:25 am
Forum: Technical / Scripting
Topic: Problems with Excel
Replies: 8
Views: 5588

Not sure of your code, I tried a simple example where I have the file name (with path and proper extension) in one cell in excel and then copy it to the clipboard, then GetClipBoard>test wait>.2 RTrim>test,test wait>.2 ExecuteFile>test And it works fine on my machine (also tried different file types).
by hagchr
Thu Oct 07, 2010 10:03 am
Forum: Technical / Scripting
Topic: open csv file in Excel and AutoFit via MS & VBScript
Replies: 3
Views: 11051

Hi jpuziano, For me it works if I add the following to your code: Set xlBook = xlBook.sheets("Exceltest") (ie to add a reference to the sheet in addition to the workbook. Sheet name seems to be the same as the CSV name file). Sub OpenExcelFile(filename) Set xlApp = CreateObject("Excel.Application") ...
Sign up to our newsletter for free automation tips, tricks & discounts