Is it Possible to Extract Data From Chart?
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Is it Possible to Extract Data From Chart?
Is there any way to extract data from this chart:
http://optioncreator.com/stnub32
For example, I would like to extract the P/L (=2217.9829) for Price = 57.
I am willing to try any browser and version of iMacros
p.s. I looked at the source but I couldn't find "2217", so I assume that iMacros will not be able to find it either..?
http://optioncreator.com/stnub32
For example, I would like to extract the P/L (=2217.9829) for Price = 57.
I am willing to try any browser and version of iMacros
p.s. I looked at the source but I couldn't find "2217", so I assume that iMacros will not be able to find it either..?
Last edited by viking on Mon Oct 01, 2018 1:08 am, edited 1 time in total.
Re: Is it Possible to Extract Data From Chart?
Ho-ho...!, "shame on you...!", you've been using iMacros for more than 10 years but still can't spell it "correctly"...!? Rhooo...!!viking wrote:Is there any way to extract data from this chart:
http://optioncreator.com/stnub32
For example, I would like to extract the P/L (=2217.9829) for Price = 57.
I am willing to try any browser and version of iMarcos [sic...!]
p.s. I looked at the source but I couldn't find "2217", so I assume that iMacros will not be able to find it either..?
But OK, I tried to have a look at your Site, but I don't really understand where I'm supposed to find the "57" and "P/L (=2217.9829)" on the Page/Chart...?
Am I supposed to "Add a Position" with "Strike=57"...?
=> If you could give more Details and detailed Steps to reproduce, maybe...?
Maybe with some Printscreen or some mini-Script to reach the desired State/Data on the Page...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Yeah, not sure if this is what you want exactly, but the following mini-Script:
... will extract the following:
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)
But the Data extracted depends I think on which Data was used to construct the Chart...
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'URL GOTO=http://optioncreator.com/stnub32
'TAG POS=1 TYPE=DIV ATTR=ID:pageContainer EXTRACT=TXT
SET !EXTRACT NULL
TAG POS=1 TYPE=SVG ATTR=TXT:Created<SP>with<SP>Highcharts<SP>4.1.5PriceProfit<SP>/<SP>Lo* EXTRACT=TXT
'=> Extracted: "Created with Highcharts 4.1.5PriceProfit / LossIn 7 DaysAt Expiry4849505152535455565758-1k0k1k2k3k4k5k6k7k8kIn 7 Days
'Price = 50.28Profit / Loss = 25.674Highcharts.com"
SET Price EVAL("var s='{{!EXTRACT}}'; var x,y,z; x=s.split('Price = '); y=x[1].split('Profit'); z=y[0]; z;")
SET P/L EVAL("var s='{{!EXTRACT}}'; var x,y,z; x=s.split('Profit / Loss = '); y=x[1].split('High'); z=y[0]; z;")
PROMPT Price:<SP>_{{Price}}_<BR>P/L:<SP>_{{P/L}}_
Code: Select all
Price: _50.28_
P/L: _25.674_
But the Data extracted depends I think on which Data was used to construct the Chart...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Hum..., and maybe closer to what you want, to extract the 'P/L' Value at 'Price=57':
(Tested on iMacros v8.8.2, PM v26.3.3, Win10_x64.)
Again, the Chart depends I think on the Input Data..., and the 'EVENT' Part of my "quick & dirty" POC can very probably be simplified a lot...
First time I post this Technique on the Forum actually, ah-ah...!
=> Using the 'EVENT' Mode with a "fake" Drag&Drop to trigger some MouseOver, to then reuse the 'TAG' Mode to extract some Fields... (that could be extracted as well using the 'EVENT' Mode but it requires the 'MODIFIERS' Parameter (which is only supported on iMacros for FF until v9.0.3), so I preferred to reuse the 'TAG' Mode which makes the Script should work in all Browsers... (Hum, well, except v10.0.2 for FF now which doesn't support the 'EVENT' Mode at all anymore...! )
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'URL GOTO=http://optioncreator.com/stnub32
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(10)>tspan" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(9)>tspan" BUTTON=0
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(11)>tspan" BUTTON=0
EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(10)>tspan" BUTTON=0
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(10)>tspan" POINTS="(847,1240),(848,1238),(849,1236),(849,1235)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(3)>path:nth-of-type(10)" POINT="(849,1234)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINT="(851,1230)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(3)>path:nth-of-type(12)" POINT="(851,1229)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(851,1228),(851,1227),(851,1226),(851,1225),(851,1224),(851,1223),(851,1222),(851,1220),(851,1219),(851,1218),(851,1217),(851,1216),(851,1215),(851,1214),(851,1212),(851,1211),(851,1210),(851,1209),(851,1208),(851,1207),(851,1206),(851,1205),(851,1204),(851,1203),(851,1202),(851,1201),(851,1200),(851,1199),(851,1197),(851,1196),(850,1196),(850,1195),(850,1194),(850,1193),(850,1192),(850,1191),(850,1190),(850,1189),(850,1188),(850,1187),(850,1186),(850,1185),(850,1184)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g>path:nth-of-type(10)" POINTS="(849,1184),(849,1183),(849,1182)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>path" POINTS="(849,1181),(849,1180)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g>path:nth-of-type(10)" POINTS="(849,1179),(849,1177),(849,1176)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(848,1175),(848,1174),(848,1172),(848,1171),(848,1170),(848,1169),(847,1169),(847,1168),(847,1167),(847,1166),(847,1165),(847,1163),(847,1161),(847,1158),(847,1157),(847,1156),(847,1155),(847,1154),(847,1153),(846,1151),(846,1150),(846,1149),(846,1146),(846,1145),(846,1144),(846,1143),(846,1140),(846,1139),(846,1138),(846,1137),(846,1136)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(2)>path:nth-of-type(49)" POINT="(846,1133)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(846,1132),(846,1130),(846,1129),(846,1127),(847,1125),(847,1124),(847,1123),(848,1121),(848,1119),(848,1118),(848,1117),(848,1115),(848,1112),(848,1111),(848,1109)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g>path:nth-of-type(10)" POINTS="(849,1107),(849,1102),(849,1101),(849,1100),(849,1096),(849,1095),(849,1093),(849,1092),(849,1091),(849,1088)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(2)>path:nth-of-type(50)" POINT="(849,1086)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g>path:nth-of-type(10)" POINTS="(849,1085),(849,1081),(849,1079)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(848,1076),(848,1074),(848,1073),(848,1072),(846,1068),(846,1062),(846,1060),(846,1058),(846,1054),(846,1053),(846,1052),(846,1049),(846,1047),(846,1044),(846,1043),(846,1042),(846,1041),(846,1039)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(2)>path:nth-of-type(51)" POINT="(846,1038)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(846,1037),(846,1035),(846,1034),(846,1032),(846,1029),(846,1028),(846,1027),(845,1022),(845,1019),(845,1016),(845,1015),(845,1014),(845,1012),(845,1011),(845,1009),(845,1008),(845,1007),(845,1005),(845,1002),(845,1000),(845,999),(845,998),(845,997),(845,995),(845,994),(845,993),(845,992)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(2)>path:nth-of-type(52)" POINT="(845,990)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(845,989),(845,986),(845,984),(845,983),(845,981),(845,980),(845,979),(845,978),(845,974),(845,971),(845,970),(845,968),(845,967),(845,965),(845,964),(845,963),(845,962),(845,961),(845,960),(845,959),(845,958)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg>g:nth-of-type(5)>g:nth-of-type(3)>path" POINTS="(844,955),(844,954),(844,953)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-32>svg" POINTS="(844,952),(844,951),(844,950),(845,950),(845,949),(845,948),(846,948)"
EVENT TYPE=MOUSEUP POINT="(846,948)"
'Spot on the Curve at Price=57:
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g>path:nth-of-type(10)" BUTTON=0
'Price:
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price {{!EXTRACT}}
'P/L:
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
'TAG POS=1 TYPE=PATH ATTR=FILL:#*&&D:M<SP>*Z&&STROKE:rgb(100,100,100)&&STROKE-WIDTH:1&&VISIBILITY:visible&&TXT: EXTRACT=HTM
'TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>4<SP>795.7755 EXTRACT=TXT
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>*<SP>* EXTRACT=TXT
SET P/L {{!EXTRACT}}
PROMPT _{{Price}}_<BR>_{{P/L}}_
Code: Select all
_Price = 57_
_Profit / Loss = 4 795.7755_
Again, the Chart depends I think on the Input Data..., and the 'EVENT' Part of my "quick & dirty" POC can very probably be simplified a lot...
First time I post this Technique on the Forum actually, ah-ah...!
=> Using the 'EVENT' Mode with a "fake" Drag&Drop to trigger some MouseOver, to then reuse the 'TAG' Mode to extract some Fields... (that could be extracted as well using the 'EVENT' Mode but it requires the 'MODIFIERS' Parameter (which is only supported on iMacros for FF until v9.0.3), so I preferred to reuse the 'TAG' Mode which makes the Script should work in all Browsers... (Hum, well, except v10.0.2 for FF now which doesn't support the 'EVENT' Mode at all anymore...! )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Thank you as always for you response chivracq !
My mistake, the Chart was not saved properly. With the chart as it is I am not sure how you get the values from the extraction?
In the current chart, if you put the mouse cursor all the way to the right on the line, it will show
Price= 53.8
Profit / Loss = 886.4284
Basically, I would like to capture the Price and the Profit / Loss when the cursor is all the way to the right of the chart (and any other charts when changing the parameters).
In any case, I tried to run your 2nd script using PM 26.5.0 and iMacros v8.8.2.1 but it failed already on
BTW, Congrats on finding my hidden spelling error. Just curious to see if you would notice
My mistake, the Chart was not saved properly. With the chart as it is I am not sure how you get the values from the extraction?
In the current chart, if you put the mouse cursor all the way to the right on the line, it will show
Price= 53.8
Profit / Loss = 886.4284
Basically, I would like to capture the Price and the Profit / Loss when the cursor is all the way to the right of the chart (and any other charts when changing the parameters).
In any case, I tried to run your 2nd script using PM 26.5.0 and iMacros v8.8.2.1 but it failed already on
Code: Select all
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(10)>tspan" BUTTON=0
Re: Is it Possible to Extract Data From Chart?
OK, then this one works for me, on your original URL:viking wrote:Thank you as always for you response chivracq !
My mistake, the Chart was not saved properly. With the chart as it is I am not sure how you get the values from the extraction?
In the current chart, if you put the mouse cursor all the way to the right on the line, it will show
Price= 53.8
Profit / Loss = 886.4284
Basically, I would like to capture the Price and the Profit / Loss when the cursor is all the way to the right of the chart (and any other charts when changing the parameters).
In any case, I tried to run your 2nd script using PM 26.5.0 and iMacros v8.8.2.1 but it failed already onBTW, Congrats on finding my hidden spelling error. Just curious to see if you would noticeCode: Select all
EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(7)>text:nth-of-type(10)>tspan" BUTTON=0
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !TIMEOUT_STEP 3
TAB T=1
'URL GOTO=http://optioncreator.com/stnub32
EVENT TYPE=MOUSEDOWN SELECTOR="#pageContainer>DIV:nth-of-type(4)" BUTTON=0
EVENTS TYPE=MOUSEMOVE SELECTOR="#pageContainer>DIV:nth-of-type(4)" POINTS="(963,731),(963,732),(963,733),(963,735)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(963,737),(963,738),(963,742),(963,743),(962,763),(962,764),(962,768),(962,769),(962,771),(962,772),(962,773),(962,774),(962,775),(962,776),(962,777),(962,778),(962,779),(961,780),(961,781),(961,782),(961,783),(961,784)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINTS="(961,787),(961,788),(961,789)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINT="(961,790)"
EVENT TYPE=MOUSEUP POINT="(961,790)"
EVENT TYPE=CLICK SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" BUTTON=0
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L {{!EXTRACT}}
PROMPT _{{Price}}_<BR>_{{P/L}}_
Code: Select all
_Price = 53.8_
_Profit / Loss = 886.4284_
But hum, you might need to re-record the Drag&Drop yourself as the Coordinates might be dependent on my Screen Resolution + Browser Instance Size + Width of my iMacros Side-Panel...
Basically what I'm "doing" (and recording) is a simple (fake) Drap&Drop (= MouseMove), from the Top-Right Corner of the Chart going down until I cross the Curve, then click "just to be sure" on the Final Spot on the Curve where the Data you then want is presented in the mini-MouseOver-Popup...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Hum, yep indeed, I tested my previous Script on another FCI with a different Screen and a completely different Screen Resolution and I had to re-record the Drag&Drop:chivracq wrote:But hum, you might need to re-record the Drag&Drop yourself as the Coordinates might be dependent on my Screen Resolution + Browser Instance Size + Width of my iMacros Side-Panel...
Basically what I'm "doing" (and recording) is a simple (fake) Drap&Drop (= MouseMove), from the Top-Right Corner of the Chart going down until I cross the Curve, then click "just to be sure" on the Final Spot on the Curve where the Data you then want is presented in the mini-MouseOver-Popup...
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
'URL GOTO=http://optioncreator.com/stnub32
EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-0>svg" BUTTON=0
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(765,760),(765,762)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(2)>path:nth-of-type(38)" POINTS="(766,764),(766,765)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(766,766),(766,767),(766,769),(766,770),(766,772),(766,773),(766,774),(766,775),(766,777),(766,779),(766,780),(766,781),(766,782),(766,783),(766,785),(766,786),(766,787),(766,789),(765,791),(765,792),(765,794),(765,795)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>path" POINTS="(765,796),(765,797),(765,798),(764,798),(764,799),(764,800),(764,802),(764,803),(763,804),(763,805),(763,806),(763,807),(763,808)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>g>path" POINT="(763,809)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>g:nth-of-type(3)>path" POINTS="(763,810),(763,811),(763,812)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>g>path" POINT="(762,812)"
EVENT TYPE=MOUSEUP POINT="(762,812)"
EVENT TYPE=CLICK SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>path" BUTTON=0
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L {{!EXTRACT}}
PROMPT _{{Price}}_<BR>_{{P/L}}_
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
I rerecorded, and indeed the macro found the right price & P/L .
My excitement was short-lived though :
If I change any of the parameters or chart scaling, iMacros can't find the last point of the line (for example, change the last "Quantity" field from 1108 to 1100)). This is to be expected as the position of the last point is now at a different position than the recorded mouse coordinates.
Do you have any suggestions?
In fact, I don't need to get the last point as long as I get any point on the sloping line above Price=53.
I can calculate any other values since I have a straight line with know intercept (in this case y=0 at x=53)
My excitement was short-lived though :
If I change any of the parameters or chart scaling, iMacros can't find the last point of the line (for example, change the last "Quantity" field from 1108 to 1100)). This is to be expected as the position of the last point is now at a different position than the recorded mouse coordinates.
Do you have any suggestions?
In fact, I don't need to get the last point as long as I get any point on the sloping line above Price=53.
I can calculate any other values since I have a straight line with know intercept (in this case y=0 at x=53)
Re: Is it Possible to Extract Data From Chart?
Hum, "funny" Idea..., that works directly, ah-ah...!viking wrote:I rerecorded, and indeed the macro found the right price & P/L .
My excitement was short-lived though :
If I change any of the parameters or chart scaling, iMacros can't find the last point of the line (for example, change the last "Quantity" field from 1108 to 1100)). This is to be expected as the position of the last point is now at a different position than the recorded mouse coordinates.
Do you have any suggestions?
In fact, I don't need to get the last point as long as I get any point on the sloping line above Price=53.
I can calculate any other values since I have a straight line with know intercept (in this case y=0 at x=53)
=> Cross the whole Chart on the complete Right after your >53 vertically from the Bottom to the Top, and divide approx all the 'EVENT' Moves into 3 parts with 3 Extracts:
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'URL GOTO=http://optioncreator.com/stnub32
EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-0>svg>g:nth-of-type(7)>text:nth-of-type(11)" BUTTON=0
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(7)>text:nth-of-type(11)" POINTS="(927,1193),(927,1191),(927,1190),(928,1188),(928,1187)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(928,1185),(928,1184),(928,1183),(928,1182),(928,1181),(928,1180)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(3)>path:nth-of-type(12)" POINT="(928,1179)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(928,1178),(928,1177),(928,1176),(928,1175),(928,1174),(928,1173),(928,1172),(928,1171),(928,1170),(928,1169),(928,1168),(928,1167),(928,1166),(928,1165),(928,1164),(928,1162),(928,1161),(928,1160),(928,1157),(928,1156),(928,1155),(928,1154),(928,1152),(928,1150),(928,1148),(928,1147),(928,1146),(928,1145),(928,1144),(928,1143),(928,1142),(928,1141),(929,1140),(929,1139),(929,1138),(929,1137),(929,1136),(929,1135),(929,1134),(929,1133),(929,1132),(929,1131),(929,1130),(929,1129),(930,1128),(930,1127),(930,1125),(930,1124),(930,1123),(930,1122),(930,1121),(930,1119),(930,1118),(931,1116),(931,1115),(931,1113),(931,1112)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>path" POINTS="(931,1107),(931,1106)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(931,1104),(931,1103),(931,1102),(931,1100),(932,1099),(932,1097),(932,1096),(932,1095),(932,1093),(932,1092),(932,1091),(932,1089),(932,1088),(932,1086),(932,1084),(932,1083),(932,1081),(932,1080),(932,1079),(932,1078),(932,1077),(932,1076),(932,1075),(932,1074),(932,1073),(932,1071),(932,1070),(932,1068),(931,1067),(931,1065),(931,1064),(931,1062),(930,1061),(930,1060),(930,1058),(930,1056),(930,1055),(930,1054),(929,1054),(929,1053),(929,1052),(929,1051),(929,1050),(929,1048),(929,1047),(929,1046),(929,1045),(929,1044),(929,1043),(929,1042),(929,1040),(929,1039),(928,1037)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(2)>path:nth-of-type(33)" POINT="(928,1035)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(928,1034),(928,1033),(928,1032),(928,1031),(928,1029),(928,1028),(927,1027)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINT="(927,1025)"
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price_1 {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L_1 {{!EXTRACT}}
'PROMPT _{{Price}}_<BR>_{{P/L}}_
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(927,1024),(927,1023),(927,1021),(927,1020),(927,1019),(927,1017),(927,1016),(927,1014)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g>path:nth-of-type(11)" POINTS="(926,1013),(926,1011),(926,1010),(926,1006),(926,1005),(926,1004),(926,1002),(926,1001),(926,1000),(926,998),(926,997),(926,995),(926,994),(926,993),(926,992),(926,991),(926,989),(926,988),(926,987),(926,985),(926,983),(926,982),(926,981),(926,980),(926,978),(926,977),(926,975),(926,974),(926,972),(926,971)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(925,969),(925,968),(925,967),(925,965)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(2)>path:nth-of-type(34)" POINT="(925,964)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINTS="(925,957),(925,956),(925,955)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(925,954),(925,953),(925,952)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(925,951),(925,950),(925,949),(925,948),(925,947),(925,946),(925,945),(925,944),(925,943),(925,941),(925,940),(924,938),(924,934),(924,933),(924,932),(924,931),(924,930),(924,929),(924,928),(924,927)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>path" POINTS="(924,925),(924,924),(924,922),(924,921),(924,920)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>g>path" POINTS="(924,919),(924,918)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>g:nth-of-type(3)>path" POINTS="(924,917),(924,916),(924,915),(924,914),(924,912),(924,911),(924,910)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>g>path" POINT="(924,909)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(5)>path" POINTS="(924,908),(924,906)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINT="(924,905)"
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price_2 {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L_2 {{!EXTRACT}}
'PROMPT _{{Price}}_<BR>_{{P/L}}_
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINTS="(924,903),(924,902),(924,901),(924,900),(924,898),(924,897),(924,896),(924,895),(924,893),(924,892),(924,891)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(924,890),(924,889),(923,889),(923,888),(923,886),(923,884),(922,883),(922,882),(922,880),(921,879),(921,878),(921,877)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(921,875),(921,874),(921,873),(921,872),(921,871),(921,870),(920,870),(920,869),(920,868),(920,867),(920,865),(920,864),(920,863),(920,861),(920,859),(920,858),(920,857),(920,856),(920,855),(920,854),(920,853),(920,852),(920,851),(920,850),(920,849),(920,848),(920,846),(920,845),(920,842),(920,841),(920,840),(920,838),(920,836)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINTS="(920,835),(920,834),(920,833),(920,832),(920,831),(920,830),(920,829),(920,827)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(920,826),(920,825),(920,824),(920,823),(920,821),(920,818),(920,817),(920,816),(920,814),(920,813),(920,812),(920,811)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" POINTS="(920,810),(920,809),(920,807),(920,806),(920,805),(920,804)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINT="(920,803)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(920,801),(920,800),(920,799)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(9)>path" POINTS="(920,798),(920,797),(920,796),(920,795),(920,793),(920,792),(920,791),(920,790),(920,789),(920,788),(920,787),(920,785),(921,785),(921,784),(921,783),(921,782),(921,781),(921,780),(922,780),(922,779),(922,778),(922,777),(922,772),(922,771),(922,770),(922,769)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg>g:nth-of-type(2)>path:nth-of-type(38)" POINT="(922,747)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-0>svg" POINTS="(922,746),(922,745)"
EVENT TYPE=MOUSEUP POINT="(922,745)"
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price_3 {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L_3 {{!EXTRACT}}
'PROMPT _{{Price}}_<BR>_{{P/L}}_
PROMPT {{Price_1}}<BR>{{P/L_1}}<BR><BR>{{Price_2}}<BR>{{P/L_2}}<BR><BR>{{Price_3}}<BR>{{P/L_3}}
Code: Select all
Price = 53.32
Profit / Loss = 354.5884
Price = 53.48
Profit / Loss = 531.8684
Price = 53.8
Profit / Loss = 886.4284
You'll need to re-record the MouseMove yourself as the Coordinates are apparently dependent on my Config/Resolution/etc...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Hmm... It didn't work for me. It worked right after recording. However, when I changed the numbers in the last "Quantity" field and run it again, it first timed out on mousedown
and then hung on
(very strange)
Here is my version of your code (after redoing the mouse drag):
Code: Select all
EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-8>svg" BUTTON=0
Code: Select all
SET !EXTRACT NULL
Here is my version of your code (after redoing the mouse drag):
Code: Select all
VERSION BUILD=8820413 RECORDER=FX
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
TAB T=1
'URL GOTO=http://optioncreator.com/stnub32
EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-8>svg" BUTTON=0
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1113,1196),(1113,1194),(1113,1191),(1113,1189),(1113,1188),(1113,1186),(1113,1185),(1113,1184),(1113,1183),(1113,1181),(1113,1180),(1113,1179),(1113,1178),(1113,1176),(1113,1175),(1113,1174),(1113,1173),(1113,1171),(1113,1170),(1113,1169),(1113,1168),(1111,1166),(1111,1165),(1111,1164),(1111,1163),(1111,1161),(1111,1160),(1111,1159),(1111,1158),(1111,1156),(1111,1155),(1111,1154),(1111,1153),(1111,1151),(1111,1150),(1111,1149),(1111,1148),(1111,1146),(1111,1145),(1111,1144),(1111,1143),(1111,1141),(1111,1140),(1111,1139),(1111,1138),(1111,1136),(1111,1135),(1111,1134),(1111,1133),(1111,1131)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(2)>path:nth-of-type(34)" POINT="(1111,1130)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1111,1129),(1111,1128),(1111,1126),(1111,1125),(1111,1124),(1111,1123),(1111,1121),(1111,1120),(1111,1119),(1111,1118),(1111,1116),(1111,1115),(1111,1114),(1111,1113),(1111,1111),(1111,1110),(1111,1109),(1111,1108)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>path" POINTS="(1111,1106),(1111,1105),(1111,1104),(1111,1103),(1111,1101),(1111,1100)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>g:nth-of-type(3)>path" POINTS="(1111,1099),(1111,1098),(1111,1096)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>g:nth-of-type(2)>path" POINT="(1111,1095)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>path" POINTS="(1111,1094),(1111,1093),(1111,1091),(1111,1090),(1111,1089),(1111,1088)"
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price_1 {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L_1 {{!EXTRACT}}
'PROMPT _{{Price}}_<BR>_{{P/L}}_
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>path" POINTS="(1111,1086),(1111,1085),(1111,1084),(1110,1083),(1110,1081),(1110,1080),(1109,1079),(1109,1078),(1109,1076),(1108,1076),(1108,1075),(1108,1074)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(1108,1073),(1108,1071),(1106,1071),(1106,1070),(1106,1069),(1106,1068),(1106,1066),(1106,1065),(1106,1064),(1106,1063),(1106,1061),(1106,1060),(1106,1059),(1106,1058)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" POINTS="(1106,1056),(1106,1055),(1106,1054),(1106,1053)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(1106,1051),(1106,1050),(1106,1049),(1106,1048),(1106,1046),(1106,1045),(1106,1044),(1108,1044),(1108,1043),(1108,1041),(1108,1040),(1108,1039)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" POINTS="(1108,1038),(1108,1036),(1108,1035),(1108,1034),(1108,1033),(1108,1031),(1108,1030),(1109,1029),(1109,1028),(1109,1026),(1109,1025),(1109,1024)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan" POINTS="(1109,1023),(1109,1021),(1109,1020),(1109,1019),(1109,1018),(1109,1016),(1109,1015),(1109,1014),(1109,1013),(1109,1011),(1109,1010),(1109,1009)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>path" POINTS="(1109,1008),(1109,1006),(1109,1005),(1109,1004),(1109,1003),(1109,1001)"
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price_2 {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L_2 {{!EXTRACT}}
'PROMPT _{{Price}}_<BR>_{{P/L}}_
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1109,1000),(1109,999),(1109,998),(1109,996),(1109,995),(1109,994),(1109,993),(1109,991),(1109,990),(1109,989),(1109,988)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>path" POINTS="(1109,986),(1109,985)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1109,984),(1109,983),(1109,981),(1109,980),(1109,979),(1109,978),(1109,976),(1109,975),(1109,974),(1109,973),(1109,971),(1109,970),(1109,969),(1109,968),(1109,966),(1109,965),(1109,964),(1109,963),(1109,961),(1109,960),(1109,959),(1109,958),(1109,956),(1109,955),(1109,954),(1109,953),(1109,951),(1109,950),(1109,949),(1109,948),(1109,946),(1109,945),(1109,944),(1109,943),(1109,941),(1109,940),(1109,939),(1109,938),(1109,936),(1109,935),(1109,934),(1109,933),(1109,930),(1109,929),(1109,928),(1109,926),(1109,925),(1109,924),(1109,923),(1109,921),(1109,920),(1109,919),(1109,918),(1109,916)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(2)>path:nth-of-type(37)" POINT="(1109,915)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1109,914),(1109,913),(1109,911),(1109,910),(1109,909),(1109,908),(1109,906),(1109,905),(1109,904),(1109,903),(1109,901),(1109,900),(1109,899),(1109,898),(1109,896),(1109,895),(1109,894),(1109,893),(1109,891),(1109,890),(1109,889),(1109,888),(1109,886),(1109,885),(1109,884),(1109,883),(1109,881),(1109,880),(1109,879),(1109,878),(1109,876),(1109,875),(1109,874),(1109,873),(1109,871),(1109,870),(1109,869),(1109,868),(1109,866),(1109,865),(1109,863),(1109,861),(1109,860),(1109,859),(1109,858),(1109,856),(1109,855),(1110,854),(1110,853),(1110,851),(1110,850),(1110,849),(1110,848),(1110,846),(1110,845),(1110,844),(1110,843)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(2)>path:nth-of-type(38)" POINT="(1110,841)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1110,840),(1110,839),(1110,838),(1110,836),(1110,835),(1110,834),(1110,833)"
EVENT TYPE=MOUSEMOVE SELECTOR="#highChartsContainer" POINT="(1110,831)"
EVENTS TYPE=MOUSEMOVE SELECTOR="#pageContainer>DIV:nth-of-type(4)" POINTS="(1110,830),(1111,830),(1111,829),(1111,828),(1111,826)"
EVENT TYPE=MOUSEUP POINT="(1111,826)"
'Price:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT
SET Price_3 {{!EXTRACT}}
'>
'P/L:
'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0
SET !EXTRACT NULL
TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT
SET P/L_3 {{!EXTRACT}}
'PROMPT _{{Price}}_<BR>_{{P/L}}_
PROMPT {{Price_1}}<BR>{{P/L_1}}<BR><BR>{{Price_2}}<BR>{{P/L_2}}<BR><BR>{{Price_3}}<BR>{{P/L_3}}
Re: Is it Possible to Extract Data From Chart?
Ah-ah...!, well the Hang on the next Line after the 'MOUSEMOVE' is not that "strange", that was actually the Reason more than 5 years ago I came to the Forum for reporting that Bug... (as I couldn't find a Workaround at that time ), that was never acknowledged by TechSup/Dev, and never solved of course, I've re-mentioned it several times, but no Change..., and I finally found a Workaround about 2 years ago now... , but pfff..., this is going to be a bit tricky, it's a bit cumbersome, and I've never "really" posted/explained how I do it, it's a bit the "Next Generation" of iMacros Macros, I call them "AI-Enabled Scripts", the Script must be able by itself to determine first all the Dynamic Elements that can have a Dynamic ID/Name/Attribute/Property if they need to be reused afterwards...viking wrote:Hmm... It didn't work for me. It worked right after recording. However, when I changed the numbers in the last "Quantity" field and run it again, it first timed out on mousedownand then hung onCode: Select all
EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-8>svg" BUTTON=0
(very strange)Code: Select all
SET !EXTRACT NULL
Here is my version of your code (after redoing the mouse drag):Code: Select all
VERSION BUILD=8820413 RECORDER=FX SET !ERRORIGNORE YES SET !EXTRACT_TEST_POPUP NO TAB T=1 'URL GOTO=http://optioncreator.com/stnub32 EVENT TYPE=MOUSEDOWN SELECTOR="#highcharts-8>svg" BUTTON=0 EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1113,1196),(1113,1194),(1113,1191),(1113,1189),(1113,1188),(1113,1186),(1113,1185),(1113,1184),(1113,1183),(1113,1181),(1113,1180),(1113,1179),(1113,1178),(1113,1176),(1113,1175),(1113,1174),(1113,1173),(1113,1171),(1113,1170),(1113,1169),(1113,1168),(1111,1166),(1111,1165),(1111,1164),(1111,1163),(1111,1161),(1111,1160),(1111,1159),(1111,1158),(1111,1156),(1111,1155),(1111,1154),(1111,1153),(1111,1151),(1111,1150),(1111,1149),(1111,1148),(1111,1146),(1111,1145),(1111,1144),(1111,1143),(1111,1141),(1111,1140),(1111,1139),(1111,1138),(1111,1136),(1111,1135),(1111,1134),(1111,1133),(1111,1131)" EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(2)>path:nth-of-type(34)" POINT="(1111,1130)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1111,1129),(1111,1128),(1111,1126),(1111,1125),(1111,1124),(1111,1123),(1111,1121),(1111,1120),(1111,1119),(1111,1118),(1111,1116),(1111,1115),(1111,1114),(1111,1113),(1111,1111),(1111,1110),(1111,1109),(1111,1108)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>path" POINTS="(1111,1106),(1111,1105),(1111,1104),(1111,1103),(1111,1101),(1111,1100)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>g:nth-of-type(3)>path" POINTS="(1111,1099),(1111,1098),(1111,1096)" EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>g:nth-of-type(2)>path" POINT="(1111,1095)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(5)>path" POINTS="(1111,1094),(1111,1093),(1111,1091),(1111,1090),(1111,1089),(1111,1088)" 'Price: 'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0 SET !EXTRACT NULL TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT SET Price_1 {{!EXTRACT}} '> 'P/L: 'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0 SET !EXTRACT NULL TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT SET P/L_1 {{!EXTRACT}} 'PROMPT _{{Price}}_<BR>_{{P/L}}_ EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>path" POINTS="(1111,1086),(1111,1085),(1111,1084),(1110,1083),(1110,1081),(1110,1080),(1109,1079),(1109,1078),(1109,1076),(1108,1076),(1108,1075),(1108,1074)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(1108,1073),(1108,1071),(1106,1071),(1106,1070),(1106,1069),(1106,1068),(1106,1066),(1106,1065),(1106,1064),(1106,1063),(1106,1061),(1106,1060),(1106,1059),(1106,1058)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" POINTS="(1106,1056),(1106,1055),(1106,1054),(1106,1053)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" POINTS="(1106,1051),(1106,1050),(1106,1049),(1106,1048),(1106,1046),(1106,1045),(1106,1044),(1108,1044),(1108,1043),(1108,1041),(1108,1040),(1108,1039)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" POINTS="(1108,1038),(1108,1036),(1108,1035),(1108,1034),(1108,1033),(1108,1031),(1108,1030),(1109,1029),(1109,1028),(1109,1026),(1109,1025),(1109,1024)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>text>tspan" POINTS="(1109,1023),(1109,1021),(1109,1020),(1109,1019),(1109,1018),(1109,1016),(1109,1015),(1109,1014),(1109,1013),(1109,1011),(1109,1010),(1109,1009)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>path" POINTS="(1109,1008),(1109,1006),(1109,1005),(1109,1004),(1109,1003),(1109,1001)" 'Price: 'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0 SET !EXTRACT NULL TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT SET Price_2 {{!EXTRACT}} '> 'P/L: 'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0 SET !EXTRACT NULL TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT SET P/L_2 {{!EXTRACT}} 'PROMPT _{{Price}}_<BR>_{{P/L}}_ EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1109,1000),(1109,999),(1109,998),(1109,996),(1109,995),(1109,994),(1109,993),(1109,991),(1109,990),(1109,989),(1109,988)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(9)>path" POINTS="(1109,986),(1109,985)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1109,984),(1109,983),(1109,981),(1109,980),(1109,979),(1109,978),(1109,976),(1109,975),(1109,974),(1109,973),(1109,971),(1109,970),(1109,969),(1109,968),(1109,966),(1109,965),(1109,964),(1109,963),(1109,961),(1109,960),(1109,959),(1109,958),(1109,956),(1109,955),(1109,954),(1109,953),(1109,951),(1109,950),(1109,949),(1109,948),(1109,946),(1109,945),(1109,944),(1109,943),(1109,941),(1109,940),(1109,939),(1109,938),(1109,936),(1109,935),(1109,934),(1109,933),(1109,930),(1109,929),(1109,928),(1109,926),(1109,925),(1109,924),(1109,923),(1109,921),(1109,920),(1109,919),(1109,918),(1109,916)" EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(2)>path:nth-of-type(37)" POINT="(1109,915)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1109,914),(1109,913),(1109,911),(1109,910),(1109,909),(1109,908),(1109,906),(1109,905),(1109,904),(1109,903),(1109,901),(1109,900),(1109,899),(1109,898),(1109,896),(1109,895),(1109,894),(1109,893),(1109,891),(1109,890),(1109,889),(1109,888),(1109,886),(1109,885),(1109,884),(1109,883),(1109,881),(1109,880),(1109,879),(1109,878),(1109,876),(1109,875),(1109,874),(1109,873),(1109,871),(1109,870),(1109,869),(1109,868),(1109,866),(1109,865),(1109,863),(1109,861),(1109,860),(1109,859),(1109,858),(1109,856),(1109,855),(1110,854),(1110,853),(1110,851),(1110,850),(1110,849),(1110,848),(1110,846),(1110,845),(1110,844),(1110,843)" EVENT TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg>g:nth-of-type(2)>path:nth-of-type(38)" POINT="(1110,841)" EVENTS TYPE=MOUSEMOVE SELECTOR="#highcharts-8>svg" POINTS="(1110,840),(1110,839),(1110,838),(1110,836),(1110,835),(1110,834),(1110,833)" EVENT TYPE=MOUSEMOVE SELECTOR="#highChartsContainer" POINT="(1110,831)" EVENTS TYPE=MOUSEMOVE SELECTOR="#pageContainer>DIV:nth-of-type(4)" POINTS="(1110,830),(1111,830),(1111,829),(1111,828),(1111,826)" EVENT TYPE=MOUSEUP POINT="(1111,826)" 'Price: 'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(2)" BUTTON=0 SET !EXTRACT NULL TAG POS=1 TYPE=TSPAN ATTR=TXT:Price<SP>=<SP>* EXTRACT=TXT SET Price_3 {{!EXTRACT}} '> 'P/L: 'EVENT TYPE=CLICK SELECTOR="#highcharts-32>svg>g:nth-of-type(9)>text>tspan:nth-of-type(3)" BUTTON=0 SET !EXTRACT NULL TAG POS=1 TYPE=TSPAN ATTR=TXT:Profit<SP>/<SP>Loss<SP>=<SP>* EXTRACT=TXT SET P/L_3 {{!EXTRACT}} 'PROMPT _{{Price}}_<BR>_{{P/L}}_ PROMPT {{Price_1}}<BR>{{P/L_1}}<BR><BR>{{Price_2}}<BR>{{P/L_2}}<BR><BR>{{Price_3}}<BR>{{P/L_3}}
The "-8" part in "#highcharts-8" seems to be Dynamic in this Case (was "-0" for me), and probably changes on every Reload of the Page or Rebuild of the Chart.
But the Script(s) I posted 1-2-3 times are meant a bit as POC (Proof of Concept) to prove that it works, you'll need to experiment and "tune" it a bit by yourself, especially with the Coordinates depending on Screen Size and Resolution, what "works" for me doesn't work for you, you seem to have a bigger Screen ah-ah...!
I actually started my Drag&Drop from the mini-Text Field for the "53.5" Coordinate on the 'x' Axis and going vertically up, following the corresponding vertical Grid-Line, that I probably crossed a few times left and right from a few Pixels, (=> all the 'path' Selectors), it might be better to try to stay only on the right Side, then you'll only have to worry about the horizontal 'path' Grid-Lines that should be at fixed Positions/Coordinates.
And depending on the Scale of the Grid, the Nb of Grid-Lines and x/y Axis-Coordinates might also be Dynamic (=> notice the "g:nth-of-type(7)>text:nth-of-type(11)" in my Case, with 7 horizontal Lines and indeed 11 vertical Lines), which can also be dynamically computed.
(Mini-Difficulty with the 'EVENT' Mode is that you can't use Wildcards for the Selector, and even if you use the 'EVENT' Mode without ID's, you'll still need to compute the 'nth' Nb to use dynamically for each Sub-Level in the CSS... (Can be done, I use it myself, and it is even "my Workaround" for implementing 'Relative Positioning' in the 'EVENT' Mode...! ))
=> OK, the POC works, I guess you understood the "Principle", now you need to find a "simpler" and more "universal" Script that will work for different Scenarios for your different Chart Input Values...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
I am sorry, but I don't follow this. How do I solve the issue of the script hanging on the next Line after the 'MOUSEMOVE'?chivracq wrote: Ah-ah...!, well the Hang on the next Line after the 'MOUSEMOVE' is not that "strange", that was actually the Reason more than 5 years ago I came to the Forum for reporting that Bug... (as I couldn't find a Workaround at that time ), that was never acknowledged by TechSup/Dev, and never solved of course, I've re-mentioned it several times, but no Change..., and I finally found a Workaround about 2 years ago now... , but pfff..., this is going to be a bit tricky, it's a bit cumbersome, and I've never "really" posted/explained how I do it, it's a bit the "Next Generation" of iMacros Macros, I call them "AI-Enabled Scripts", the Script must be able by itself to determine first all the Dynamic Elements that can have a Dynamic ID/Name/Attribute/Property if they need to be reused afterwards...
The "-8" part in "#highcharts-8" seems to be Dynamic in this Case (was "-0" for me), and probably changes on every Reload of the Page or Rebuild of the Chart.
Re: Is it Possible to Extract Data From Chart?
You need to make sure that the Selector used for the 'MOUSEMOVE' exists and is found by iMacros by first extracting some higher Level Element (usually a 'DIV') to check if it exists in it, and then using 'EVAL()' to compute a Var to return a String containing that 'Selector' or "BODY" otherwise for example which will always exist on the Page, and a 'MOUSEMOVE' on 'BODY' won't do anything usually, apart maybe from selecting a bit of Text, but the Script won't hang at least...viking wrote:I am sorry, but I don't follow this. How do I solve the issue of the script hanging on the next Line after the 'MOUSEMOVE'?chivracq wrote: Ah-ah...!, well the Hang on the next Line after the 'MOUSEMOVE' is not that "strange", that was actually the Reason more than 5 years ago I came to the Forum for reporting that Bug... (as I couldn't find a Workaround at that time ), that was never acknowledged by TechSup/Dev, and never solved of course, I've re-mentioned it several times, but no Change..., and I finally found a Workaround about 2 years ago now... , but pfff..., this is going to be a bit tricky, it's a bit cumbersome, and I've never "really" posted/explained how I do it, it's a bit the "Next Generation" of iMacros Macros, I call them "AI-Enabled Scripts", the Script must be able by itself to determine first all the Dynamic Elements that can have a Dynamic ID/Name/Attribute/Property if they need to be reused afterwards...
The "-8" part in "#highcharts-8" seems to be Dynamic in this Case (was "-0" for me), and probably changes on every Reload of the Page or Rebuild of the Chart.
More Info and Code Example in the following Thread:
- Re: How can I avoid element waiting issue?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Hum, I edited my previous Post to add the Link to some related Thread where I had posted the Workaround...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Is it Possible to Extract Data From Chart?
Thanks chivracq.
Actually my particular issue was easily solved. When I recorded in EVENT mode, I had checked "Favor element Ids in selectors". After I unchecked this and recorded again, I got a macro that didn't hang anymore. All I needed in my macro was:
BTW, you mentioned that v10, which I haven't tested yet, doesn't include the EVENT mode anymore. Is that correct!? That would severely limit iMacros...I guess we need to hang on to our old versions and Browsers (I can't go beyond FF 52.8.1 as it would break several critical extensions)
Actually my particular issue was easily solved. When I recorded in EVENT mode, I had checked "Favor element Ids in selectors". After I unchecked this and recorded again, I got a macro that didn't hang anymore. All I needed in my macro was:
Code: Select all
EVENT TYPE=MOUSEDOWN SELECTOR="HTML>BODY" BUTTON=0
EVENTS TYPE=MOUSEMOVE SELECTOR="HTML>BODY>DIV>DIV:nth-of-type(5)>DIV>svg" POINTS="(1346,893),(1345,893),(1345,894),(1344,894),(1343,894),(1341,894),(1340,894),(1339,894),(1338,894),(1338,893),(1336,893)"
BTW, you mentioned that v10, which I haven't tested yet, doesn't include the EVENT mode anymore. Is that correct!? That would severely limit iMacros...I guess we need to hang on to our old versions and Browsers (I can't go beyond FF 52.8.1 as it would break several critical extensions)