Search found 47 matches

by djs
Thu Jun 19, 2014 4:27 pm
Forum: Technical / Scripting
Topic: IETagEventByAttrib - Can I blank a value?
Replies: 4
Views: 4621

Re: IETagEventByAttrib - Can I blank a value?

Interesting solution. It works with google, I'll try it on the actual webpage later and make sure it gets through the validation.
Thanks for the unique way to do this.

Dan
by djs
Thu Jun 19, 2014 2:25 pm
Forum: Technical / Scripting
Topic: IETagEventByAttrib - Can I blank a value?
Replies: 4
Views: 4621

Re: IETagEventByAttrib - Can I blank a value?

Thanks Marcus. I thought I might just be doing something crazy. The particular webpage I'm working on has several calculated fields based on another field I set. The only way to get the fields to calculate correctly is if they are blanked out on submission. If not blank, they stay on their current v...
by djs
Thu Jun 19, 2014 6:21 am
Forum: Technical / Scripting
Topic: IETagEventByAttrib - Can I blank a value?
Replies: 4
Views: 4621

IETagEventByAttrib - Can I blank a value?

I'm working on a project where I need to clear some fields on a webpage at times. I wanted to use IETagEventByAttrib, but I can't figure out how to clear an existing value. I can use it to set values, its much faster then IEFormFill, but I can't seem to get it to clear a value. I assume this is beca...
by djs
Tue Apr 15, 2014 12:19 am
Forum: Technical / Scripting
Topic: Reading/Writing in Excel
Replies: 3
Views: 4013

From similar experience......
Open task manager, kill off all of the running Excel processes and it should open read / write on the next attempt.

Odds are, you have the spreadsheet open in another Excel process already.

Make sure you are closing excel in your code when you are done with it.

dan
by djs
Mon Oct 07, 2013 2:19 pm
Forum: Technical / Scripting
Topic: Excel Sheet Names - How to retrieve
Replies: 2
Views: 3707

This seems to work. I'll do a bit more testing and then I'll post the corrected code in case someone else needs it in the future. In my tests so far, it seems to work to get the correct sheet names, even if Excel is open on a different workbook entirely. It also appears not to leave Excel open, whic...
by djs
Sun Oct 06, 2013 11:51 pm
Forum: Technical / Scripting
Topic: Excel Sheet Names - How to retrieve
Replies: 2
Views: 3707

Excel Sheet Names - How to retrieve

I have an application in MacroScript that automates reading a spreadsheet, puts a bunch of stuff into a browser, lets the backend of the browser do some calculations then extracts info out of the browser and puts it back into a new spreadsheet. Macroscript works well in doing this. But.. and there i...
by djs
Fri Oct 04, 2013 1:07 pm
Forum: Technical / Scripting
Topic: DateDiff - Which one is larger?
Replies: 1
Views: 2997

Oops, nevermind. Marcus had already answered this question in another thread.

Code: Select all

Let>sample=09-Sep-2013
VBEval>DateDiff("d",Date(),CDate("%sample%")),diff
If>diff<0>The date is in the past
Endif
The VB version of datediff does this correctly. Cool!
by djs
Fri Oct 04, 2013 1:00 pm
Forum: Technical / Scripting
Topic: DateDiff - Which one is larger?
Replies: 1
Views: 2997

DateDiff - Which one is larger?

When using datediff, is there a way to know which one is larger? Consider: GetDate>today DateAdd>today,d,2,nextdate DateDiff>today,nextdate,d,res1 DateDiff>nextdate,today,d,res2 When you run this, both res1 and res2 are set to 2. Is there a way to get one set to -2? Or is there a routine to know whi...
by djs
Fri Oct 04, 2013 12:48 pm
Forum: Technical / Scripting
Topic: ONERROR - What line caused the error?
Replies: 1
Views: 3676

ONERROR - What line caused the error?

I've recently started making use of the ability to create custom onerror messages. This is extremely powerful, but....... If I write a custom onerror routine, is there a way to know what line caused the error? I can get lost trying to fix a problem when it basically gives me the line number of the o...
by djs
Tue Aug 06, 2013 5:07 pm
Forum: Technical / Scripting
Topic: 64 bit GetTextInit Problems
Replies: 22
Views: 23994

Marcus Is IEGetTagPos working correctly now? I know it was broken (see thread http://www.mjtnet.com/forum/post33912.html?sid=3a243fd9e4c9abb6ed921895e71a4736) Nothing in the release notes has mentioned it being fixed and when I've tried it recently, it didn't work correctly for me, though I tried it...
by djs
Tue Aug 06, 2013 5:01 pm
Forum: Technical / Scripting
Topic: Getting Specific Data From Excel
Replies: 14
Views: 12961

How do you determine what 'block' of data you want? You can read any line in the file. I'm not sure if you have an excel spreadsheet (.xlsx) or a text file (.csv). If its a text file, just use: ReadLn>File Path,105,mydataline In this case, 105 is the line of data you want to read, it can be any line...
by djs
Thu Aug 01, 2013 6:57 pm
Forum: Technical / Scripting
Topic: Sort by last column / item in list?
Replies: 5
Views: 6141

Use the bubble sort routine that Marcus posted a while back.

http://www.mjtnet.com/forum/viewtopic.php?p=14303

This is exactly the type of thing that bubble sorts do.

In fact, I would recommend having the bubble sort as part of your code library. Its a very useful tool.

Dan
by djs
Thu Aug 01, 2013 6:50 pm
Forum: Technical / Scripting
Topic: 64 bit GetTextInit Problems
Replies: 22
Views: 23994

While I would love to see this working, keep in mind, one of the great things about Macro Scheduler is the flexibility of how things are done. If gettextpos isn't working, use image recognition, with the new image recognition stuff, its pretty bullet proof and is a reasonable substitute. Just grab a...
by djs
Wed Jul 31, 2013 5:55 pm
Forum: Technical / Scripting
Topic: Getting Specific Data From Excel
Replies: 14
Views: 12961

If I understand that you basically have a single column of data, you want to move that column to the other file, its a fairly easy task. I assume the original file is static (not being added to) while you are working with it. If so, simply read the whole file using XLSheetToArray (or CSVFileToArray)...
by djs
Wed Jul 31, 2013 2:00 pm
Forum: Technical / Scripting
Topic: Text Capture: GetTextPos
Replies: 1
Views: 3411

You might want to review this thread:
http://www.mjtnet.com/forum/64-bit-gett ... t7284.html

Its a known issue on 64 bit platforms. I haven't tried it in a while, but it did work properly for me on 32 bit machines previously.

Dan
cron
Sign up to our newsletter for free automation tips, tricks & discounts