Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/17/2019 in all areas

  1. Spikemg1, Got it! Global $CheckOut = GUICreate("Check Out AV Equipment", @DesktopWidth, @DesktopHeight, 0, 0, $WS_POPUP) GUICtrlSetResizing(-1, 1) GUICtrlSetBkColor(-1, 0xFFFFFF) When you create your secondary GUI, you are mistakenly using GUICtrlSet* commands - which obviously act on the last created control, in this case setting the final button to white. Easy when you see it! M23
    2 points
  2. Well I couldn't resists trying to fix this set of UDF's so think I am getting close with the attached version: #include <array.au3> #include <json.au3> $json1 = '{"Global Quote":{"01. symbol" : "MSFT","02. open" : "01.10","03 high" : "10.1"}}' $json1bis = '{"GlobalQuote":{"01. symbol" : "MSFT","02. open" : "02.10","03 high" : "20.2"}}' $json1tris = '{"GlobalQuote":{"01. symbol" : "MSFT","02.open" : "03.10","03high" : "30.3"}}' $Json = Json_Decode($json1) $Jsonbis = Json_Decode($json1bis) $Jsontris = Json_Decode($json1tris) ; ConsoleWrite("!===============================================================================" & @crlf) 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 2bis2-->> " & Json_Get($Jsonbis, 'GlobalQuote."03 high"') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 2bis3-->> " & Json_Get($Jsonbis, 'GlobalQuote.03 high') & @LF) ; ==>> it doesn't work!! ;~ ; 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!!;~ ; ; ConsoleWrite("CASE 1 -->> " & Json_Get($Json, '."Global Quote"."03 high"') & @LF) ; ==>> it works!! ConsoleWrite("CASE 1 -->> " & Json_Get($Json, '."Global Quote"."02. open"') & @LF) ; ==>> it works!! ConsoleWrite("CASE 2 -->> " & Json_Get($Json, '.Global Quote."02. open"') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 2bis -->> " & Json_Get($Jsonbis, '.GlobalQuote."02. open"') & @LF) ; ==>> it works!! ConsoleWrite("CASE 2bis2-->> " & Json_Get($Jsonbis, 'GlobalQuote."02. open"') & @LF) ; ==>> it doesn't work!! ;~ ; ConsoleWrite("CASE 3 -->> " & Json_Get($Json, '[Global Quote][02. open]') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 3bis -->> " & Json_Get($Jsonbis, '[GlobalQuote][02. open]') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 3tris-->> " & Json_Get($Jsontris, '[GlobalQuote][02.open]') & @LF) ; ==>> it doesn't work!! ;~ ; ConsoleWrite("CASE 4 -->> " & Json_Get($Json, '[Global Quote]["02. open"]') & @LF) ; ==>> it doesn't work!! ConsoleWrite("CASE 4bis -->> " & Json_Get($Jsonbis, '[GlobalQuote]["02. open"]') & @LF) ; ==>> it works!!;~ ; Results: !=============================================================================== CASE 1 -->> 10.1 CASE 2 -->> 10.1 CASE 2bis -->> 20.2 CASE 2bis2-->> 20.2 CASE 2bis3-->> 20.2 CASE 3 -->> 10.1 CASE 3bis -->> 20.2 CASE 3tris-->> 30.3 CASE 4 -->> 10.1 CASE 4bis -->> 20.2 CASE 1 -->> 10.1 CASE 1 -->> 01.10 CASE 2 -->> 01.10 CASE 2bis -->> 02.10 CASE 2bis2-->> 02.10 CASE 3 -->> 01.10 CASE 3bis -->> 02.10 CASE 3tris-->> 03.10 CASE 4 -->> 01.10 CASE 4bis -->> 02.10 @aio and others, could you have a spin with this version to see whether anything is broken? Jos Json.au3
    2 points
  3. Deye

    Assign from Global

    Too fast FrancescoDiMuro Give me a chance to check if my question is whole see the above Edit ; Sorry Edit : Its $ASSIGN_FORCEGLOBAL some how i have completely missed that Thanks Deye
    1 point
  4. FrancescoDiMuro

    Assign from Global

    @Deye Something like this: Assign("strVariable", "Some text", $ASSIGN_FORCEGLOBAL) _EvalData() Func _EvalData() Local $strEvalString = Eval("strVariable") MsgBox($MB_ICONINFORMATION, "", "$strVariable = " & $strEvalString) EndFunc
    1 point
  5. jchd

    GPA Calculator

    That's what I said: "I'd love to change the world", by Ten Years After (a British group).
    1 point
  6. User751139, Sorry for the delay in replying - local internet outage. Glad you like the UDF. But at first glance I cannot see any easy way to get clickable links into the notifications - but I will think more about it over the weekend. M23
    1 point
  7. Subz

    RegWrite to run chkdsk

    The following works fine for me: #RequireAdmin Local $sRegRoot = @OSArch = "x64" ? "HKLM64" : "HKLM" _RegWrite($sRegRoot & "\SYSTEM\CurrentControlSet\Control\Session Manager", "BootExecute", "REG_MULTI_SZ", "autocheck autochk /r \??\C:") Func _RegWrite($_sKeyName, $_sValueName, $_sType, $_sValue) Local $sResult RegWrite($_sKeyName, $_sValueName, $_sType, $_sValue) Switch @error Case 0 $sResult = "Success" Case 1 $sResult = "Error unable to open requested key" Case 2 $sResult = "Error unable to open requested main key" Case 3 $sResult = "Error unable to remote connect to the registry" Case -1 $sResult = "Error unable to open requested value" Case -2 $sResult = "Error value type not supported" EndSwitch MsgBox(4096, "Reg Result", $sResult) EndFunc
    1 point
  8. I've honestly havent looked at that one yet. Just started with this build and added some stuff to make my life easier. I am fine with any good solution so will have a look at that option. Jos
    1 point
  9. Subz

    Activate Excel Window

    Just the last line doesn't wok, unfortunately don't have a lot of time, but just replace the last line with: $oWorkbook2.ActiveSheet.Range("A7").Select $oWorkbook2.ActiveSheet.Paste
    1 point
×
×
  • Create New...