<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/</id><updated>2023-11-24T12:44:45.419000Z</updated><subtitle>Recent posts to SP8 - New scriptengine feature - open:VersionUpdateFlags</subtitle><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#c064" rel="alternate"/><published>2023-11-24T12:44:45.419000Z</published><updated>2023-11-24T12:44:45.419000Z</updated><author><name>srigan1986</name><uri>https://forge.codesys.com/u/srigan1986/</uri></author><id>https://forge.codesys.comb68a406a0f5577c6f0acb8331d25d9e1cf7c4b98</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is this issue of idling before loading libraries resolved in Codesys 3.5.18.40 ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#8a3d" rel="alternate"/><published>2023-11-24T12:44:39.283000Z</published><updated>2023-11-24T12:44:39.283000Z</updated><author><name>srigan1986</name><uri>https://forge.codesys.com/u/srigan1986/</uri></author><id>https://forge.codesys.com6424ed05344c3458efef33060947d975a82bfd98</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is this issue of idling before loading libraries resolved in Codesys 3.5.18.40 ?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#1b31" rel="alternate"/><published>2020-02-27T15:00:01.688000Z</published><updated>2020-02-27T15:00:01.688000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comcd070e7886e89d708438e31cb6a39070c7bbbea6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;p&gt;Hi, Etamgul,&lt;/p&gt;
&lt;p&gt;Sorry that the issue is not fixed yet. As there's a workaround, it was priorized rather low, so higher priority issues were fixed first.&lt;/p&gt;
&lt;p&gt;I triggered our product management to boost the priority a little bit, so the issue will now most likely be fixed with one of the next service packs. (It's already too late for the upcoming V3.5 SP11, which is already fully planned, but there's rather good chances for SP12.)&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
M.Schaber&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#5600" rel="alternate"/><published>2020-02-27T15:00:01.029000Z</published><updated>2020-02-27T15:00:01.029000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.com4d324d0a9ffe3ab681962f5357c83a881bda075e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Could you please re-check if it is working or not?&lt;/p&gt;
&lt;p&gt;Link is not available to the public and this issue was reported with SP8, &lt;br/&gt;
now I checked it with SP10 and none of the above examples are working.&lt;/p&gt;
&lt;p&gt;Update: jira is running now, issue is still not addressed (Bug is in OPEN, &lt;strong&gt;Fix Version/s: Not Planned&lt;/strong&gt;). Good to see.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#1b4b" rel="alternate"/><published>2020-02-27T14:59:59.208000Z</published><updated>2020-02-27T14:59:59.208000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comc5e821f3e8dad2659ead989e8595ded74525adca</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;p&gt;Hi, etamgul,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;etamgul hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Does this work on your side?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The second script worked for me on a small toy project, but it failed on a bigger project.&lt;/p&gt;
&lt;p&gt;My mistake was to believe that the version compatibility manager kicks in on the Application.Idle() event. While this is true, it only happens after both the project background loading and the loading of all libraries is finished, and this needs more time (more Idle() events) for bigger projects.&lt;/p&gt;
&lt;p&gt;Currently, there's no direct way to force this to happen. &lt;/p&gt;
&lt;p&gt;As a workaround, using clean_all() or check_all_pool_objects() on the project, or a build on the application should also trigger those events, so issuing one of them followed by a few rounds of DoEvents() and RaiseIdle() should update the project.&lt;/p&gt;
&lt;p&gt;I filed the bug report &lt;a class="" href="http://jira.3s-software.com/browse/CDS-48995" rel="nofollow"&gt;CDS-48995&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;HTH,&lt;br/&gt;
Markus&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#9d57" rel="alternate"/><published>2020-02-27T14:59:58.543000Z</published><updated>2020-02-27T14:59:58.543000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.com051488cabfe9ac19a13b463d568517f419d3bb20</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Okay I gave up experimenting with the RaiseIdle:&lt;br/&gt;
But you gave me an idea (I basically only wanted to update the projects when the compiler or any other version changes).&lt;/p&gt;
&lt;p&gt;So instead of trying to raise the event that executes the update I used the SendKey .net method to navigate and do 'semi-manually' the keystrokes..&lt;/p&gt;
&lt;p&gt;This one works on my side, though it will not necessarly work every time (depends how fast the IDE processes the sent keys):&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    # &lt;span class="nv"&gt;navigate&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Set all to newest&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nv"&gt;button&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{TAB}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{TAB}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{TAB}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    # &lt;span class="nv"&gt;Hit&lt;/span&gt; &lt;span class="nv"&gt;and&lt;/span&gt; &lt;span class="nv"&gt;confirm&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{ENTER}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{ENTER}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    # &lt;span class="nv"&gt;Navigate&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;OK&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{TAB}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
    # &lt;span class="nv"&gt;confirm&lt;/span&gt;
    &lt;span class="nv"&gt;System&lt;/span&gt;.&lt;span class="nv"&gt;Windows&lt;/span&gt;.&lt;span class="nv"&gt;Forms&lt;/span&gt;.&lt;span class="nv"&gt;SendKeys&lt;/span&gt;.&lt;span class="k"&gt;Send&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{ENTER}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
     
    # &lt;span class="nv"&gt;raise&lt;/span&gt; &lt;span class="nv"&gt;a&lt;/span&gt; &lt;span class="nv"&gt;project&lt;/span&gt; &lt;span class="nv"&gt;update&lt;/span&gt; &lt;span class="nv"&gt;window&lt;/span&gt;
    &lt;span class="nv"&gt;system&lt;/span&gt;.&lt;span class="nv"&gt;commands&lt;/span&gt;[&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;project&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;, &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;checkavailableversions&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;].&lt;span class="nv"&gt;execute&lt;/span&gt;&lt;span class="ss"&gt;()&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Would be cool to access the buttons with some guid or other method, the problem is that execute() is a blocking call.. so workarounds for workaround.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#0d4d" rel="alternate"/><published>2020-02-27T14:59:57.841000Z</published><updated>2020-02-27T14:59:57.841000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.com6af50cf3eab1e7be42d5c0e3504e7b00a4f32a68</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Does this work on your side?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#077f" rel="alternate"/><published>2020-02-27T14:59:56.094000Z</published><updated>2020-02-27T14:59:56.094000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.comd43627615902a777ad19cda90ddab2b7779267ed</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I only tried to import the 'System' based on some quick google search.&lt;/p&gt;
&lt;p&gt;Unfortunately none of the above examples work (they get executed though, it just seem that the compiler update does not happen).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#4194" rel="alternate"/><published>2020-02-27T14:59:55.432000Z</published><updated>2020-02-27T14:59:55.432000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comc560518efaf97c73a5d492d204a50492b4d09f1a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; M.Schaber&lt;/p&gt;
&lt;p&gt;Hi, etamgul,&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;etamgul hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Are you sure that we are still talking about codesys scriptengine?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Yes, as the CODESYS ScriptEngine allows access to most .NET Framework APIs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;etamgul hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
I have tried to execute the suggested codepieces but Codesys throws me an exception &lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="s1"&gt;'namespace#'&lt;/span&gt; &lt;span class="k"&gt;object&lt;/span&gt; &lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'Forms'&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="k"&gt;read&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;only&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Has anybody ever tried testing this or is there something I missed in codesys setup?&lt;/p&gt;
&lt;p&gt;It was a mistake in my example code (I simplified to much during copy-paste). The import line needs to be replaced with:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;System&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nn"&gt;clr&lt;/span&gt;
&lt;span class="n"&gt;clr&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AddReference&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"System.Windows.Forms"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Sorry for the trouble...&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SP8 - New scriptengine feature - open:VersionUpdateFlags</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/a633968a36/?limit=25#cb32" rel="alternate"/><published>2020-02-27T14:59:54.794000Z</published><updated>2020-02-27T14:59:54.794000Z</updated><author><name>etamgul</name><uri>https://forge.codesys.com/u/etamgul/</uri></author><id>https://forge.codesys.com057464da7028b5b84e999fd90d005f4716f1763b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Are you sure that we are still talking about codesys scriptengine?&lt;/p&gt;
&lt;p&gt;I have tried to execute the suggested codepieces but Codesys throws me an exception &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="s1"&gt;'namespace#'&lt;/span&gt; &lt;span class="k"&gt;object&lt;/span&gt; &lt;span class="n"&gt;attribute&lt;/span&gt; &lt;span class="s1"&gt;'Forms'&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="k"&gt;read&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;only&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Has anybody ever tried testing this or is there something I missed in codesys setup?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>