iMacros: URL GOTO={{!COLn}} Error - firefox

I have an eight-column csv ('UTF-8, with BOM' formatted), where the eighth column is a URL. I have the following code that's simple enough and supposed to take me to a different URL pending the row:
VERSION BUILD=123456 RECORDER=FX
SET !DATASOURCE /Users/Ryan/iMacros/test.csv
SET !DATASOURCE_COLUMNS 8
SET !LOOP 2
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO={{!COL8}}
There's more to it than that, but I essentially just need the URL in column 8 to populate before the rest of the code. Anybody know why I'm getting a crazy error message?
Error loading page http://api.mybrowserbar.com/cgi/searchp ...
google.com/, line 7 (Error code: -933)
Seems like the "https://www.google.com/" at the end of the error message is just whichever website I was currently on while trying to run the macro; the test URL currently in column 8, row 2 is http://www.facebook.com, which appears nowhere in the error. And "Error code: -933" means "Network error while file or page loading." Any ideas? I'm using the newest version of iMacros and Firefox on Mac OS X.

Well, that was simple. Instead of loading your URLs in the csv as http://www.google.com, for example, just load them in as ="http://www.google.com" and it works great.

Related

Does FlameRobin have problems with the insertion of umlauts?

I have a table with a field
VALCONTENT BLOB SUB_TYPE TEXT SEGMENT SIZE 80
When I browse the table, right click on an entry, select "Edit blob" the content is shown.
If I enter "normal" test ("Hello world"), I can click "Save" and things work.
If I use umlauts ("Hällö Wörld"), I get an error message:
IBPP::SQLExcetption, Contenten: Statement: Execure (Update MyTable set
foo= ? where ..." Message isc_dsql_execute2 failed, -303, incompatible
column, malformed string
Am I doing something wrong or is FlameRobin not able to handle UTF8?
I am using Firebird 4.0 64bit, FlameRobin 0.9.3 Unicode x64 (all just downloaded).
Extracting the DDL with "iSQL -o" shows in the first line
/* CREATE DATABASE 'E:\foo.fdb' PAGE_SIZE 16384 DEFAULT CHARACTER SET
UTF8; */
I can reproduce the issue (with blob character set UTF8 and connection character set UTF8), which suggests this is a bug in FlameRobin. I recommend reporting it on https://github.com/mariuz/flamerobin/issues. I'm not sure what the problem is. Updating does seem to work fine when using connection character set WIN1252.
Consider using a different tool, maybe DBeaver, or IBExpert, etc.

VBScript, open Read-only documents in edit mode - Word 2013

I've been struggling to find a way to open a Read-only document in Normal/Edit mode instead of Reading mode with MS Word 2013. Word 2013 by default enables the start up option to "Open e-mail attachments and other uneditable files in reading view".
How would I go about disabling this option or changing the view from Reading to Normal/Edit view when the document is opened. (I need to keep the document as read-only as it might be accessed by multiple people at once)
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(documentPath,,True)
objWord.ActiveWindow.ActivePane.View.Type = wdNormalView
I have tried to set the view mode using the above but received the an error code shown below. I looked at other variations of line 3 but can't get it to work. I'm still working my way around learning VBScript so I'm assuming i'm not doing this the right way.
Error: One of the values passed to this method or property is out of range
Code: 800A16D3
Source: Microsoft Word
Thanks.
You're using VBScript - it doesn't understand what wdNormalView means. This is an internal value for VBA. You need to find the actual value held for this constant and apply that instead. The constant is a WdViewType and the values are as follows:
Name Value Description
wdMasterView 5 A master view.
wdNormalView 1 A normal view.
wdOutlineView 2 An outline view.
wdPrintPreview 4 A print preview view.
wdPrintView 3 A print view.
wdReadingView 7 A reading view.
wdWebView 6 A Web view.
So the option you want to select is 1. Try the following code and see if this works:
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(documentPath,,True)
objWord.ActiveWindow.ActivePane.View.Type = 1

How to get Developer Exception page to show multiple lines of code around exception?

This page https://learn.microsoft.com/en-us/aspnet/core/api/microsoft.aspnetcore.builder.developerexceptionpageoptions states that a DeveloperExceptionPageOptions object can be passed as a parameter to app.UseDeveloperExceptionPage() and one of the properties on the options object is SourceCodeLineCount. Specifically, it says that the SourceCodeLineCount property:
Determines how many lines of code to include before and after the line of code present in an exception's stack frame. Only applies when symbols are available and source code referenced by the exception stack trace is present on the server.
But when I put the following code in the Configure method of the startup.cs class:
app.UseDeveloperExceptionPage( new DeveloperExceptionPageOptions() { SourceCodeLineCount = 10} );
The output in the Developer Exception Page doesn't appear to show the 20 lines of source code that it's suppose to.
How does one get the Developer Exception page to show multiple lines of code around exception?
I'm not sure if you're still having this problem or not, but have you tried browsers other than IE? When I'm running in Chrome, I'm seeing a little [+] symbol on the left of each line number, that can be used to expand each snippet of code.
The line that the error occurs is highlighted in red, and the SourceCodeLineCount value (in my case, set to 2) is used to display the number of lines above the line that caused your exception.
See sample screenshot below. Hope this helps!

Insert Property of Picture Class

I have read all of the questions on here about this topic and none of them provided me with a workable solution, so I'm asking this one.
I am running a legitimate copy of Excel 2013 in Windows 7. I record a macros where I insert a picture, and in the open file dialog I paste this URL: http://ecx.images-amazon.com/images/I/41u%2BilIi00L._SL160_.jpg (simply a picture of a product on Amazon). This works as expected.
The resulting macros looks like this:
Sub insertImage()
'
' percent Macro
'
'
ActiveSheet.Pictures.Insert( _
"http://ecx.images-amazon.com/images/I/41u+ilIi00L._SL160_.jpg").Select
End Sub
However, when I attempt to run this, the Insert line breaks with the following error:
Run-time error '1004':
Unable to get the Insert property of the Picture class
I am trying to insert a number of pictures into an excel document and I am using the ActiveSheet.Pictures.Insert method to do this. I have been experiencing this issue there, so I recreated it in a way others could replicate to facilitate getting an answer...
An interesting thing to note is:
http://ecx.images-amazon.com/images/I/41u%2BilIi00L._SL160_.jpg 'This is what I pasted
http://ecx.images-amazon.com/images/I/41u+ilIi00L._SL160_.jpg 'This is what the recorded macros recorded
It looks like Excel automatically resolved the %2B to a +. I tried making that change, but to no success.
Another interesting thing to note is that sometimes this does work and sometimes it doesn't. This url is a case where it does not work. Here's one where it does: http://ecx.images-amazon.com/images/I/51mXQ-IjigL._SL160_.jpg
Why would Excel generate a macros it can't run? More importantly, how can I avoid this error and get on with my work!? Thanks!
Try this workaround:
Sub RetrieveImage()
Dim wsht As Worksheet: Set wsht = ThisWorkbook.ActiveSheet
wsht.Shapes.AddPicture "http://ecx.images-amazon.com/images/I/41u+ilIi00L._SL160_.jpg", _
msoFalse, msoTrue, 0, 0, 100, 100
End Sub
All fields are required, which is kind of a bummer since you cannot get the default size. The location offsets and sizes are in pixels/points. Also, the % turning to + is just alright, as % would cause it to be not recognized (dunno why).
Result:
Let us know if this helps.
I'm experiencing the same issue.
After some digging I found out Excel does a HTTP HEAD request before getting the image.
If this HEAD request is unsuccessful Excel will return the exact error messages mentioned in this discussion.
Your could easily test this using Fiddler.

How to loop and extract data from various url's using the iMacros Addon for Firefox

I would like to extract data form a spacific url such as www.example.com/data.php?id=xx
Where xx is a number between 1 and 1000 (ie. the script should loop through) and extract the data so far I have the following script:
VERSION BUILD=7401110 RECORDER=FX TAB
T=1
SET !LOOP 1
URL GOTO=http://www.example/data.php?id={{!LOOP}}
TAG POS=2 TYPE=TD ATTR=TXT:* EXTRACT=TXT
Now how can I achieve this to loop properly also if a url eg www.example.com/data.php?id=4
does not exist no data is extracted but the script continues and finally how can I get the data to be outputted to a file?
Thanks
With the macro you wrote, if you use the Loop function (that is, hit the play loop button) the macro is going to load one url after the other and extract the desired data.
However, the data is not going to be saved, but presented to you in a popup at each step. To avoid that, include the command
SET !EXTRACT_TEST_POPUP NO
at the beginning. For the saving, use SAVEAS TYPE=EXTRACT
you need to set error ignore to make the script continue if data not found, use this:
SET !ERRORIGNORE YES

Resources