<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Sciter]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14607</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14607&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Sciter».]]></description>
		<lastBuildDate>Mon, 22 Apr 2019 13:39:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133763#p133763</link>
			<description><![CDATA[<p>Мой низкий поклон за Вашу наблюдательность!<br />Теперь работает.</p>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Mon, 22 Apr 2019 13:39:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133763#p133763</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133762#p133762</link>
			<description><![CDATA[<p>У library.exe более старая scite.dll, которая у меня подхватывается library.exe, но не работает в связке ahk + SciterSharpWindows.dll.<br />А работает scite.dll из оригинального дистрибутива.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 22 Apr 2019 13:10:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133762#p133762</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133761#p133761</link>
			<description><![CDATA[<p>Вы говорите о запуске &quot;TheLibrary.exe&quot;?<br />Если так, то при первом старте, программа просит указать папку с SDK и в этом же сообщении предлагает его скачать с этой страницы.</p>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Mon, 22 Apr 2019 13:06:13 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133761#p133761</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133760#p133760</link>
			<description><![CDATA[<p>Понял причину.<br />Для запуска нужно поместить в ту же&nbsp; директорию sciter.dll отсюда:<br /><a href="https://sciter.com/download/">https://sciter.com/download/</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 22 Apr 2019 12:53:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133760#p133760</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133758#p133758</link>
			<description><![CDATA[<p>У меня так выглядит запущенная &quot;TheLibrary.exe&quot;:<br /><span class="postimg"><img src="https://c.radikal.ru/c11/1904/39/3608ada1cdbe.png" alt="https://c.radikal.ru/c11/1904/39/3608ada1cdbe.png" /></span></p><p>Странная ошибка, какая-то. Толком ничего в поиске не могу найти.</p>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Mon, 22 Apr 2019 12:19:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133758#p133758</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133757#p133757</link>
			<description><![CDATA[<p><strong>KusochekDobra</strong>, у меня такая же система, как и у вас.<br />.NET framework v4.72 с четырьмя апдейтами.<br />TheLibrary.exe запускается, но ничего не происходит.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 22 Apr 2019 11:36:44 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133757#p133757</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133756#p133756</link>
			<description><![CDATA[<p>Сообщение исключения:<br /></p><div class="quotebox"><blockquote><p>0x80131604 - <br />Source:		mscorlib<br />Description:	Адресат вызова создал исключение.<br />HelpFile:		(null)<br />HelpContext:	0</p></blockquote></div><p><span class="postimg"><img src="https://c.radikal.ru/c17/1904/79/c49a2d62f937.png" alt="https://c.radikal.ru/c17/1904/79/c49a2d62f937.png" /></span><br />Win 7 x64 со всеми обновлениями, AHK x32 v1.1.30.03.<br />.NET framework v4.7 обновлён.</p><p>TheLibrary.exe запускается нормально.</p>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Mon, 22 Apr 2019 11:21:15 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133756#p133756</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133755#p133755</link>
			<description><![CDATA[<p><strong>Malcev</strong>, у вас ,случаем, не x64? Поскольку, ни первый вариант(&quot;свежая&quot; тема), ни второй у меня не работает.</p><p>P.S. запускаю TheLibrary.exe и вылазит окно о несовместимых версиях винды, что уже намекает.</p>]]></description>
			<author><![CDATA[null@example.com (MandarinKa02)]]></author>
			<pubDate>Mon, 22 Apr 2019 11:00:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133755#p133755</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133753#p133753</link>
			<description><![CDATA[<p>С dll из пакета для Nuget тоже работает.<br /></p><div class="codebox"><pre><code>html =
(
&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
body {
  background-color: linen;
}

h1 {
  color: maroon;
  margin-left: 40px;
} 
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;
This is an Experiment
&lt;/h1&gt;
&lt;div&gt;
Sciter runs in AHK!
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;

)

sci := Clr_LoadLibrary(&quot;SciterSharpWindows.dll&quot;)
sciwin := Clr_CreateObject(sci, &quot;SciterSharp.SciterWindow&quot;)
sciwin.CreateMainWindow(400, 300)
sciwin.CenterTopLevelWindow()
sciwin.Title := &quot;Using SciterSharp in AutoHotkey&quot;
sciwin.LoadHtml(html)
sciwin.Show()
return

Escape::ExitApp


; ==========================================================
;                  .NET Framework Interop
;      https://autohotkey.com/boards/viewtopic.php?t=4633
; ==========================================================
;
;   Author:     Lexikos
;   Version:    1.2
;   Requires:	AutoHotkey_L v1.0.96+
;

CLR_LoadLibrary(AssemblyName, AppDomain=0)
{
	if !AppDomain
		AppDomain := CLR_GetDefaultDomain()
	e := ComObjError(0)
	Loop 1 {
		if assembly := AppDomain.Load_2(AssemblyName)
			break
		static null := ComObject(13,0)
		args := ComObjArray(0xC, 1),  args[0] := AssemblyName
		typeofAssembly := AppDomain.GetType().Assembly.GetType()
		if assembly := typeofAssembly.InvokeMember_3(&quot;LoadWithPartialName&quot;, 0x158, null, null, args)
			break
		if assembly := typeofAssembly.InvokeMember_3(&quot;LoadFrom&quot;, 0x158, null, null, args)
			break
	}
	ComObjError(e)
	return assembly
}

CLR_CreateObject(Assembly, TypeName, Args*)
{
	if !(argCount := Args.MaxIndex())
		return Assembly.CreateInstance_2(TypeName, true)
	
	vargs := ComObjArray(0xC, argCount)
	Loop % argCount
		vargs[A_Index-1] := Args[A_Index]
	
	static Array_Empty := ComObjArray(0xC,0), null := ComObject(13,0)
	
	return Assembly.CreateInstance_3(TypeName, true, 0, null, vargs, null, Array_Empty)
}

CLR_CompileC#(Code, References=&quot;&quot;, AppDomain=0, FileName=&quot;&quot;, CompilerOptions=&quot;&quot;)
{
	return CLR_CompileAssembly(Code, References, &quot;System&quot;, &quot;Microsoft.CSharp.CSharpCodeProvider&quot;, AppDomain, FileName, CompilerOptions)
}

CLR_CompileVB(Code, References=&quot;&quot;, AppDomain=0, FileName=&quot;&quot;, CompilerOptions=&quot;&quot;)
{
	return CLR_CompileAssembly(Code, References, &quot;System&quot;, &quot;Microsoft.VisualBasic.VBCodeProvider&quot;, AppDomain, FileName, CompilerOptions)
}

CLR_StartDomain(ByRef AppDomain, BaseDirectory=&quot;&quot;)
{
	static null := ComObject(13,0)
	args := ComObjArray(0xC, 5), args[0] := &quot;&quot;, args[2] := BaseDirectory, args[4] := ComObject(0xB,false)
	AppDomain := CLR_GetDefaultDomain().GetType().InvokeMember_3(&quot;CreateDomain&quot;, 0x158, null, null, args)
	return A_LastError &gt;= 0
}

CLR_StopDomain(ByRef AppDomain)
{	; ICorRuntimeHost::UnloadDomain
	DllCall(&quot;SetLastError&quot;, &quot;uint&quot;, hr := DllCall(NumGet(NumGet(0+RtHst:=CLR_Start())+20*A_PtrSize), &quot;ptr&quot;, RtHst, &quot;ptr&quot;, ComObjValue(AppDomain))), AppDomain := &quot;&quot;
	return hr &gt;= 0
}

; NOTE: IT IS NOT NECESSARY TO CALL THIS FUNCTION unless you need to load a specific version.
CLR_Start(Version=&quot;&quot;) ; returns ICorRuntimeHost*
{
	static RtHst := 0
	; The simple method gives no control over versioning, and seems to load .NET v2 even when v4 is present:
	; return RtHst ? RtHst : (RtHst:=COM_CreateObject(&quot;CLRMetaData.CorRuntimeHost&quot;,&quot;{CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}&quot;), DllCall(NumGet(NumGet(RtHst+0)+40),&quot;uint&quot;,RtHst))
	if RtHst
		return RtHst
	EnvGet SystemRoot, SystemRoot
	if Version =
		Loop % SystemRoot &quot;\Microsoft.NET\Framework&quot; (A_PtrSize=8?&quot;64&quot;:&quot;&quot;) &quot;\*&quot;, 2
			if (FileExist(A_LoopFileFullPath &quot;\mscorlib.dll&quot;) &amp;&amp; A_LoopFileName &gt; Version)
				Version := A_LoopFileName
	if DllCall(&quot;mscoree\CorBindToRuntimeEx&quot;, &quot;wstr&quot;, Version, &quot;ptr&quot;, 0, &quot;uint&quot;, 0
	, &quot;ptr&quot;, CLR_GUID(CLSID_CorRuntimeHost, &quot;{CB2F6723-AB3A-11D2-9C40-00C04FA30A3E}&quot;)
	, &quot;ptr&quot;, CLR_GUID(IID_ICorRuntimeHost,  &quot;{CB2F6722-AB3A-11D2-9C40-00C04FA30A3E}&quot;)
	, &quot;ptr*&quot;, RtHst) &gt;= 0
		DllCall(NumGet(NumGet(RtHst+0)+10*A_PtrSize), &quot;ptr&quot;, RtHst) ; Start
	return RtHst
}

;
; INTERNAL FUNCTIONS
;

CLR_GetDefaultDomain()
{
	static defaultDomain := 0
	if !defaultDomain
	{	; ICorRuntimeHost::GetDefaultDomain
		if DllCall(NumGet(NumGet(0+RtHst:=CLR_Start())+13*A_PtrSize), &quot;ptr&quot;, RtHst, &quot;ptr*&quot;, p:=0) &gt;= 0
			defaultDomain := ComObject(p), ObjRelease(p)
	}
	return defaultDomain
}

CLR_CompileAssembly(Code, References, ProviderAssembly, ProviderType, AppDomain=0, FileName=&quot;&quot;, CompilerOptions=&quot;&quot;)
{
	if !AppDomain
		AppDomain := CLR_GetDefaultDomain()
	
	if !(asmProvider := CLR_LoadLibrary(ProviderAssembly, AppDomain))
	|| !(codeProvider := asmProvider.CreateInstance(ProviderType))
	|| !(codeCompiler := codeProvider.CreateCompiler())
		return 0

	if !(asmSystem := (ProviderAssembly=&quot;System&quot;) ? asmProvider : CLR_LoadLibrary(&quot;System&quot;, AppDomain))
		return 0
	
	; Convert | delimited list of references into an array.
	StringSplit, Refs, References, |, %A_Space%%A_Tab%
	aRefs := ComObjArray(8, Refs0)
	Loop % Refs0
		aRefs[A_Index-1] := Refs%A_Index%
	
	; Set parameters for compiler.
	prms := CLR_CreateObject(asmSystem, &quot;System.CodeDom.Compiler.CompilerParameters&quot;, aRefs)
	, prms.OutputAssembly          := FileName
	, prms.GenerateInMemory        := FileName=&quot;&quot;
	, prms.GenerateExecutable      := SubStr(FileName,-3)=&quot;.exe&quot;
	, prms.CompilerOptions         := CompilerOptions
	, prms.IncludeDebugInformation := true
	
	; Compile!
	compilerRes := codeCompiler.CompileAssemblyFromSource(prms, Code)
	
	if error_count := (errors := compilerRes.Errors).Count
	{
		error_text := &quot;&quot;
		Loop % error_count
			error_text .= ((e := errors.Item[A_Index-1]).IsWarning ? &quot;Warning &quot; : &quot;Error &quot;) . e.ErrorNumber &quot; on line &quot; e.Line &quot;: &quot; e.ErrorText &quot;`n`n&quot;
		MsgBox, 16, Compilation Failed, %error_text%
		return 0
	}
	; Success. Return Assembly object or path.
	return compilerRes[FileName=&quot;&quot; ? &quot;CompiledAssembly&quot; : &quot;PathToAssembly&quot;]
}

CLR_GUID(ByRef GUID, sGUID)
{
	VarSetCapacity(GUID, 16, 0)
	return DllCall(&quot;ole32\CLSIDFromString&quot;, &quot;wstr&quot;, sGUID, &quot;ptr&quot;, &amp;GUID) &gt;= 0 ? &amp;GUID : &quot;&quot;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Mon, 22 Apr 2019 07:42:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133753#p133753</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133750#p133750</link>
			<description><![CDATA[<p>По приведенной мной ссылке у меня работает - показывает окно с введённым текстом.<br />AHK 32 bit 1.1.30.03.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sun, 21 Apr 2019 23:22:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133750#p133750</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133749#p133749</link>
			<description><![CDATA[<p><strong>Malcev</strong>, спасибо за ссылку.<br />В &quot;свежей&quot; теме, автор оставил ссылку в которой есть указание, что это пакет для NuGet. Я его просто <a href="https://www.nuget.org/packages/SciterSharpWindows/2.0.73">скачал</a> и вскрыл архиватором, вытащив dll.&nbsp; В TheLibrary, dll той же версии, разве что судя по дате изменения она на два дня моложе и на 8Кб полегче, но это вряд ли что-то меняет, раз реакция на пример у неё идентична.</p>]]></description>
			<author><![CDATA[null@example.com (KusochekDobra)]]></author>
			<pubDate>Sun, 21 Apr 2019 22:36:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133749#p133749</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133735#p133735</link>
			<description><![CDATA[<p>Мои познания(на данный момент) в семействе C языков программирования не уходят дальше Hello World. Поэтому - не знаю. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Но, знаю одно - есть желание, есть стремление.</p>]]></description>
			<author><![CDATA[null@example.com (MandarinKa02)]]></author>
			<pubDate>Sun, 21 Apr 2019 16:23:25 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133735#p133735</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133733#p133733</link>
			<description><![CDATA[<div class="quotebox"><cite>MandarinKa02 пишет:</cite><blockquote><p>В дальнейшем буду смотреть в сторону ultralig.ht. Возможно, попытаюсь провернуть это дело на AHK.</p></blockquote></div><p>Как вы это собираетесь переносить?<br /></p><div class="quotebox"><blockquote><p>The API is currently available for C++</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sun, 21 Apr 2019 15:59:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133733#p133733</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133732#p133732</link>
			<description><![CDATA[<p><strong>KusochekDobra</strong>, значит дллку криво скомпилили.<br />Берите, например, отсюда:<br /><a href="http://misoftware.com.br/Home/Post/TheLibrary">http://misoftware.com.br/Home/Post/TheLibrary</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Sun, 21 Apr 2019 15:43:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133732#p133732</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Sciter]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=133731#p133731</link>
			<description><![CDATA[<p><strong>KusochekDobra</strong>, к сожалению - нет. Sciter имеет много страшных CSS-свойств, которых в привычном CSS&#039;е нет. Поэтому остановлюсь на том, что начал. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />В дальнейшем буду смотреть в сторону <a href="http://ultralig.ht">ultralig.ht</a>. Возможно, попытаюсь провернуть это дело на AHK.</p>]]></description>
			<author><![CDATA[null@example.com (MandarinKa02)]]></author>
			<pubDate>Sun, 21 Apr 2019 15:29:14 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=133731#p133731</guid>
		</item>
	</channel>
</rss>
