This is an example of how to build a Clarion multi dll project from the command line. This was useful to be able to correctly build a multi-dll project containing circular references.
There are two calls so everything gets compiled.
(I assume that you have your own Rectagle fom the .Net window, I have created one here as a test) | |
thisScreen OF Screen = Screen.FromControl(SELF) ! <-- screen this form is currently on | |
! Get a Rectangle to use in our test below. | |
rect OF Rectangle = NEW Rectangle(thisScreen.Bounds.X, thisScreen.Bounds.Y, thisScreen.Bounds.Width, thisScreen.Bounds.Height) | |
! Loop through all known screens and test to see if our rectangle is on one of them | |
s OF Screen &= NULL ! Not sure if there is an "inline" way to do this in clarion... | |
FOREACH s IN Screen.AllScreens | |
IF s.Bounds.IntersectsWith(rect) |
ECHO off | |
:delfile | |
del %1% | |
if exist %1% goto fail | |
goto end | |
:fail | |
ECHO Unable to delete %1%, you probably still have it open! | |
EXIT /B 1 | |
:end |
// Update from skype discussion | |
// First, check to see if your input is a hex string or not | |
private static int GetClarionColorFromString(string line) | |
{ | |
if (line.Contains("h") || line.Contains("H")) | |
{ | |
char[] chars = { 'h', 'H' }; | |
line = line.TrimEnd(chars); |
using System; | |
using System.IO; | |
using ICSharpCode.Core; | |
using ICSharpCode.SharpDevelop.Gui; | |
using SoftVelocity.Generator.UI; | |
namespace ClarionAddins | |
{ | |
public class TestForRick : AbstractMenuCommand | |
{ |
! Add the custom row in the reset method | |
FDBLocation.Reset PROCEDURE | |
CODE | |
! Add <All> entry to the queue | |
IF Records(SELF.Q) = 0 | |
Clear(SELF.Q) | |
SELF.Q.PRE:DisplayFieldName = '<All>' | |
Add(SELF.Q) | |
END |
cls | |
if ($args[0]) | |
{exit} | |
# NOTE: Make sure you have the PowerShell Community Extensions installed | |
# http://pscx.codeplex.com/ | |
Import-Module pscx | |
function ProcessFile($pSourceFile, $pOutputFile) { | |
Write-Host "Processing" $pSourceFile |
DECLARE @offset int | |
SET @offset = DATEDIFF(hh, GetDate(), GETUTCDATE()); | |
SELECT GetDate() AS 'System DateTime' | |
, GETUTCDATE() AS 'UTC DateTime' | |
, @offset AS 'OffSet' | |
, DateAdd(hh, @offset, GetDate()) AS 'System converted to UTC' | |
, DateAdd(hh, @offset*-1, GetUtcDate()) AS 'UTC Converted to System' |
Convert PROCEDURE(*FILE pSourceFile, *FILE pTargetFile) | |
sourceRec &GROUP | |
targetRec &GROUP | |
CODE | |
sourceRec &= pSourceFile{PROP:Record} | |
targetRec &= pTargetFile{PROP:Record} | |
targetRec :=: sourceRec |
# Using the beta version of WinSCP http://winscp.net/eng/download.php | |
# Call this script to upload a file via FTP with progress feedback | |
# e.g. | |
# .\fileupload.ps1 -username "myusername" -password "mypassword" -localfile "C:\files\MyFile.exe" -remotefile "/public_html/files/MyFile.exe" | |
# NOTE: This script assumes the WinSCP binaries are in a sub directory to the script. You can probably pass that as a parameter to be more flexible. | |
param ( | |
[string]$username, | |
[string]$password, | |
[string]$localFile, |