Jump to content

aio

Members
  • Posts

    9
  • Joined

  • Last visited

aio's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hi. Sorry for going back so much with the quoted post, but I was looking for some inspiration to make _OOoCalc_BookAttach() function working in my code. I thought I was coding something wrong, but I believe that @keafter was right when indicating the problem in the FileExists verification. If Not FileExists($sFileName) Then Return SetError($_OOoCalcStatus_NoMatch, 1, 0) I'm using UDF OOoCalc.au3 last modification dated 2016/11/16. For my purpose the FileExists() verification is not needed, so my personal workaround is just skip the verification and everything works perfectly.
  2. Tested with functions Json_Get and Json_ObjGet. It works in both functions with dots and blankspaces. Don't know if more extensive tests should be performed to guarantee that everything else still works fine. @Jos Many thanks and sorry for interrupting your schedule.
  3. Yes, I did. Also retested with the combinations indicated in following posts from Jos and TheXman Sigh..... I was hoping that there was a solution because of Json_Dump () capable of retrieving all the values. Anyway there could be also a problem when keys contains a blankspace like in my case ("Global Quote"). See below, answering to TheXman Here is my testing of all combinations using my keys. As far as I understand there could be a bug also when a key contains a blankspace. #include <json.au3> $json1 = '{"Global Quote":{"01. symbol" : "MSFT","02. open" : "101.9000","03 high" : "102.8716"}}' $json1bis = '{"GlobalQuote":{"01. symbol" : "MSFT","02. open" : "101.9000","03 high" : "102.8716"}}' $json1tris = '{"GlobalQuote":{"01. symbol" : "MSFT","02. open" : "101.9000","03high" : "102.8716"}}' $Json = Json_Decode($json1) $Jsonbis = Json_Decode($json1bis) $Jsontris = Json_Decode($json1tris) ; ConsoleWrite("CASE 1 -->> " & Json_Get($Json, '."Global Quote"."03 high"') & @LF) ; ==>> it works!! ; ConsoleWrite("CASE 2 -->> " & Json_Get($Json, '.Global Quote."03 high"') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 2bis -->> " & Json_Get($Jsonbis, '.GlobalQuote."03 high"') & @LF) ; ==>> it works!! ; ConsoleWrite("CASE 3 -->> " & Json_Get($Json, '[Global Quote][03 high]') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 3bis -->> " & Json_Get($Jsonbis, '[GlobalQuote][03 high]') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 3tris -->> " & Json_Get($Jsontris, '[GlobalQuote][03high]') & @LF) ; ==>> it doesn't work!! ; ConsoleWrite("CASE 4 -->> " & Json_Get($Json, '[Global Quote]["03 high"]') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 4bis -->> " & Json_Get($Jsonbis, '[GlobalQuote]["03 high"]') & @LF) ; ==>> it works!!
  4. Hi everybody and many thanks for sharing this UDF. I'm not an expert in programming languages but I'm trying to get some data from an API that is similar to the $json1 of the following code: #include <json.au3> $json1 = '{"Global Quote":{"01. symbol" : "MSFT","02. open" : "101.9000","03 high" : "102.8716"}}' $Json = Json_Decode($json1) $coord = Json_ObjGet($Json, "Global Quote") ConsoleWrite(Json_ObjGet($coord, "01. symbol") & @LF) ConsoleWrite(Json_ObjGet($coord, "03 high") & @LF) The problem that I'm trying to solve is that the keys of the Json file includes dots (.) and therefore I cannot get the value. The debug console returns with success the value of the key "03 high" where I've eliminated the dot, while doesn't return any value for the "01. symbol". I tried to double quote the keys. I also tried to use Json_Get instead of Json_ObjGet but nothing works. On the other side the Json_Dump shows correctly all the values (for keys with or without dots), but it's too difficult for me to get the solution from the UDF code. #include <json.au3> $data = '{"Global Quote":{"01. symbol" : "MSFT","02. open" : "101.9000","03 high" : "102.8716"}}' Global $object = Json_Decode($data) ConsoleWrite("!== Json_TokenDump ============================================================================================================" & @CRLF) Json_Dump($data) !== Json_TokenDump ============================================================================================================ +-> .Global Quote.01. symbol =MSFT +-> .Global Quote.02. open =101.9000 +-> .Global Quote.03 high =102.8716 >Exit code: 0 Time: 0.3965 Can anyone kindly give me an hint for this problem?
  5. Ooopss.... Haven't seen this thankyou 'SmOke_N'. I'll try it and give you a feedback.
  6. I've some day off...can anyone give us an help? As far as I've understood, when you click on that kind of links control is taken by the dialog box interrupting the execution of any script line following ... How can we solve this problem? As Duncan says is a very basic automation with IE and it's impossible that none has faced it previously.
  7. Hi, continuing my search in historical posts I found other people with the same problem but still not found a solution.. anyway .... here a couple of links could be useful by Larry by DaleHohm have to think about those... It's really difficult to hit an historical post with the solution to a problem... ¿does anyone have a shorcut?
  8. Hi, I've the very same problem that originated this thread... ..as finally the investigation stopped because of no posting code.. find here my "troubled" one.. #include <IE.au3> $oIE = _IECreate ("http://uk.msn.com/#", 0, 1, 1, -1) $oForm = _IEFormGetcollection ($oIE, 0) _IELinkClickByText ($oIE, "Make this your homepage") Opt("WinTitleMatchMode", 4) ControlClick("Página de inicio","¿Desea establecer","Button2") Title and text of ControlClick command to be changed according to the national OS Tried to play with Focus and other and functions but no success in giving a "no" to the message window. Any idea of where I'm failing? This is the screenshot
  9. Hi, let me use this same thread to make my question. I'm using IE functions to access a https URL and before accessing the URL an ALERT message box is automatically opened by IE. What's the simplest and best way to detect this box and accept to continue with the code execution? I use this, but I don't like too much because of mouse movement. Is there any elegant IE function to do this? winwait("name of alert window") MouseClick("left",550,450) thanks
×
×
  • Create New...