Dialog Slider Object

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Dialog Slider Object

Post by JRL » Tue Jan 19, 2010 6:53 pm

There have been several occasions where I have wanted a slider object. For example in the Color Chooser program I posted recently I used a radio button trick discussed HERE. Sliders would behave much more eloquently. Maybe I'll rewrite that script someday.

Here is a sample script that provides a "Slider Object". It is actually a button moving up and down on a progress bar, but it looks like and feels like a vertical slider. Later, I will provide an example of how to incorporate this into a usable dialog.

Be sure to read the comments in the script.

Code: Select all

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////START PROG PARAMS///////////////////////////////
//Programmer Configurable parameters
//Slider upper left X,Y position in Dialog
Let>SliderXstart...1=100
Let>SliderYstart...1=50

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...1=40
Let>SliderTall...1=400

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...1=30
Let>ButtonTall...1=6

Let>Dialog_Window_Name=Slider Sample
//////////////////////////////END PROG PARAMS////////////////////////////////
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////
//Calculated parameters
Let>Initial_Location...1={%SliderTall...1%/2}
Let>SliderTall...1=%SliderTall...1%+ButtonTall...1
Let>SliderYcenter...1={round(%SliderYstart...1%+(%SliderTall...1%/2))}
Let>ButtonX...1={%SliderXstart...1%-(round(%ButtonWide...1%/2))}
Let>ButtonY...1={round(%SliderYcenter...1%-(%ButtonTall...1%/2))}
Let>SliderXnegComp...1={%SliderXstart...1%-(round(%SliderWide...1%/2))}
Let>SliderYposComp...1=%SliderYstart...1%+%SliderTall...1%
Let>ButtonXW...1=%ButtonX...1%+%SliderWide...1%
Let>ButtonYH...1=%SliderYposComp...1%-%ButtonTall...1%
Let>penlocation...1={round(%ButtonTall...1%/2)}
Dialog>TitleBarSizeCalculation
Button=1,0,0,75,25,0
EndDialog>TitleBarSizeCalculation
Let>WIN_USEHANDLE=1
GetWindowPos>TitleBarSizeCalculation.msButton1.handle,OffSetX,OffSetY
Let>WIN_USEHANDLE=0
//////////////////////////////END DO NOT ALTER///////////////////////////////
/////////////////////////////////////////////////////////////////////////////


//Sample dialog configurable to taste except for the sliders section
//Make sure the dialog is big enough to accomodate the slider
Dialog>Dialog1
   Caption=%Dialog_Window_Name%
   Width=200
   Height=500
   Top=100
   Left=20
   Edit=msedit1,50,20,100,%Initial_Location...1%
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" construction
   ProgressBar=msProgressBar1,%SliderXstart...1%,%SliderYstart...1%,1,%SliderTall...1%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar2,%SliderXnegComp...1%,%SliderYstart...1%,%SliderWide...1%,1,0
   //Center horizontal line for slider "object" construction
   ProgressBar=msProgressBar3,%SliderXnegComp...1%,%SliderYcenter...1%,%SliderWide...1%,1,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar4,%SliderXnegComp...1%,%SliderYposComp...1%,%SliderWide...1%,1,0
   //Button used for slider
   Button=.,%ButtonX...1%,%ButtonY...1%,%ButtonWide...1%,%ButtonTall...1%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
EndDialog>Dialog1

Show>dialog1

OnEvent>WINDOW_NOTOPEN,%Dialog_Window_Name%,2,Exit
OnEvent>KEY_DOWN,VK1,0,SliderMove
Let>VertSliderMoveFlag...1=0
Let>StopMoving...1=0

//Main Loop//////////////////////////////////////////////////////////////////////
Label>Loop
If>VertSliderMoveFlag...1>0
  Add>VertSliderMoveFlag...1,1
  If>VertSliderMoveFlag...1>10
    Let>VertSliderMoveFlag...1=0
    Let>StopMoving...1=0
  EndIf
EndIf

//Set slider button color.  In this line "111111" is the color number
GoSub>DrawLine,%dialog1.msbutton1.handle%,ButtonTall...1,111111,0,penlocation...1,ButtonWide...1,penlocation...1
Wait>0.01
Goto>Loop





/////////////////////////////////////////////////////////////////////////////
//////////////////////////////SUBROUTINES////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////

SRT>SliderMove
  GoSub>SliderMove...1
END>SliderMove

//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...1
  GetCursorPos>CurX,CurY
  GetWindowPos>%Dialog_Window_Name%,WinX,WinY
  Add>WinY,%OffsetY%
  Sub>CurX,%WinX%
  Sub>CurY,%WinY%
  Sub>cury,%penlocation...1%

If>{(%VertSliderMoveFlag...1%>0)or((%CurX%>%ButtonX...1%)and(%CurX%<%ButtonXW...1%)and(%CurY%>%SliderYstart...1%)and(%CurY%<%ButtonYH...1%))}
  Let>VertSliderMoveFlag...1=1
  If>%CurY%<%SliderYstart...1%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%SliderYstart...1%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...1=1
  EndIf
  If>%CurY%>%ButtonYH...1%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%ButtonYH...1%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...1=1
  EndIf
  If>StopMoving...1=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...1=0
  EndIf
EndIf
  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton1.handle%,SomeX,ButtonY...1
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msEdit1"
  Let>Dialog1.msEdit1={%ButtonY...1%-%SliderYstart...1%-%WinY%}
  ResetDialogAction>Dialog1
END>SliderMove...1

SRT>Exit
  Exit>0
END>Exit

//DrawLine Usage:
//GoSub>DrawLine,WindowHandle,PenSize,PenColor,XStart,YStart,XEnd,YEnd

SRT>DrawLine
  LibFunc>user32,GetDC,HDC,%DrawLine_var_1%
  LibFunc>gdi32,CreatePen,Penres,0,%DrawLine_var_2%,%DrawLine_var_3%
  LibFunc>gdi32,SelectObject,SOPres,hdc,Penres
  Libfunc>gdi32,MoveToEx,mtres,HDC,%DrawLine_var_4%,%DrawLine_var_5%,0
  LibFunc>gdi32,LineTo,ltres,hdc,%DrawLine_var_6%,%DrawLine_var_7%
  LibFunc>gdi32,DeleteObject,DOres,Penres
  LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC
END>DrawLine
//////////////////////////////END DO NOT ALTER///////////////////////////////
/////////////////////////////////////////////////////////////////////////////

sarver311
Pro Scripter
Posts: 84
Joined: Tue Jun 17, 2008 6:37 pm

Post by sarver311 » Tue Jan 19, 2010 7:43 pm

JRL,

Excellent work. It seems like there is no end to the tricks and techniques that can get squeezed out of Macro Scheduler. Thank you for your contributions and sharing this with everyone!

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Jan 19, 2010 10:59 pm

Here's a three slider example:

Code: Select all

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////START PROG PARAMS///////////////////////////////
//Save settings file name
Let>SettingsFile=%temp_dir%~LastSliderSettings.txt

//Programmer Configurable parameters ...1
//Slider upper left X,Y position in Dialog
Let>SliderXstart...1=100
Let>SliderYstart...1=50

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...1=40
Let>SliderTall...1=200

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...1=30
Let>ButtonTall...1=6



//Programmer Configurable parameters ...2
//Slider upper left X,Y position in Dialog
Let>SliderXstart...2=200
Let>SliderYstart...2=50

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...2=40
Let>SliderTall...2=400

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...2=30
Let>ButtonTall...2=6



//Programmer Configurable parameters ...3
//Slider upper left X,Y position in Dialog
Let>SliderXstart...3=300
Let>SliderYstart...3=50

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...3=40
Let>SliderTall...3=300

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...3=30
Let>ButtonTall...3=6

Let>Dialog_Window_Name=Slider Sample
//////////////////////////////END PROG PARAMS////////////////////////////////
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////
//Calculated parameters ...1
Let>Initial_Location...1={round(%SliderTall...1%/2)}
Let>SliderTall...1=%SliderTall...1%+ButtonTall...1
Let>SliderYcenter...1={round(%SliderYstart...1%+(%SliderTall...1%/2))}
Let>ButtonX...1={%SliderXstart...1%-(round(%ButtonWide...1%/2))}
Let>ButtonY...1={round(%SliderYcenter...1%-(%ButtonTall...1%/2))}
Let>SliderXnegComp...1={%SliderXstart...1%-(round(%SliderWide...1%/2))}
Let>SliderYposComp...1=%SliderYstart...1%+%SliderTall...1%
Let>ButtonXW...1=%ButtonX...1%+%SliderWide...1%
Let>ButtonYH...1=%SliderYposComp...1%-%ButtonTall...1%
Let>penlocation...1={round(%ButtonTall...1%/2)}


//Calculated parameters ...2
Let>Initial_Location...2={round(%SliderTall...2%/2)}
Let>SliderTall...2=%SliderTall...2%+ButtonTall...2
Let>SliderYcenter...2={round(%SliderYstart...2%+(%SliderTall...2%/2))}
Let>ButtonX...2={%SliderXstart...2%-(round(%ButtonWide...2%/2))}
Let>ButtonY...2={round(%SliderYcenter...2%-(%ButtonTall...2%/2))}
Let>SliderXnegComp...2={%SliderXstart...2%-(round(%SliderWide...2%/2))}
Let>SliderYposComp...2=%SliderYstart...2%+%SliderTall...2%
Let>ButtonXW...2=%ButtonX...2%+%SliderWide...2%
Let>ButtonYH...2=%SliderYposComp...2%-%ButtonTall...2%
Let>penlocation...2={round(%ButtonTall...2%/2)}


//Calculated parameters ...3
Let>Initial_Location...3={round(%SliderTall...3%/2)}
Let>SliderTall...3=%SliderTall...3%+ButtonTall...3
Let>SliderYcenter...3={round(%SliderYstart...3%+(%SliderTall...3%/2))}
Let>ButtonX...3={%SliderXstart...3%-(round(%ButtonWide...3%/2))}
Let>ButtonY...3={round(%SliderYcenter...3%-(%ButtonTall...3%/2))}
Let>SliderXnegComp...3={%SliderXstart...3%-(round(%SliderWide...3%/2))}
Let>SliderYposComp...3=%SliderYstart...3%+%SliderTall...3%
Let>ButtonXW...3=%ButtonX...3%+%SliderWide...3%
Let>ButtonYH...3=%SliderYposComp...3%-%ButtonTall...3%
Let>penlocation...3={round(%ButtonTall...3%/2)}

//Acquire prior settings if they exist
IfFileExists>%SettingsFile%
  ReadIniFile>%SettingsFile%,Settings,Location1,Initial_Location...1
  ReadIniFile>%SettingsFile%,Settings,Location2,Initial_Location...2
  ReadIniFile>%SettingsFile%,Settings,Location3,Initial_Location...3
  Let>ButtonY...1=%Initial_Location...1%+%SliderYstart...1%
  Let>ButtonY...2=%Initial_Location...2%+%SliderYstart...2%
  Let>ButtonY...3=%Initial_Location...3%+%SliderYstart...3%
Else
  WriteLn>%SettingsFile%,wres,[Settings]
  WriteLn>%SettingsFile%,wres,Location1=%Initial_Location...1%
  WriteLn>%SettingsFile%,wres,Location2=%Initial_Location...2%
  WriteLn>%SettingsFile%,wres,Location3=%Initial_Location...3%
EndIf
//One time only acquire title bar size
Dialog>TitleBarSizeCalculation
Button=1,0,0,75,25,0
EndDialog>TitleBarSizeCalculation
Let>WIN_USEHANDLE=1
GetWindowPos>TitleBarSizeCalculation.msButton1.handle,OffSetX,OffSetY
Let>WIN_USEHANDLE=0

//////////////////////////////DO NOT ALTER///////////////////////////////////
/////////////////////////////////////////////////////////////////////////////


//Sample dialog configurable to taste except for the sliders section
//Make sure the dialog is big enough to accomodate the slider
Dialog>Dialog1
   Caption=%Dialog_Window_Name%
   Width=600
   Height=500
   Top=100
   Left=20
   Edit=msedit1,50,20,100,%Initial_Location...1%
   Edit=msedit2,150,20,100,%Initial_Location...2%
   Edit=msedit3,250,20,100,%Initial_Location...3%
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" construction
   ProgressBar=msProgressBar1,%SliderXstart...1%,%SliderYstart...1%,1,%SliderTall...1%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar2,%SliderXnegComp...1%,%SliderYstart...1%,%SliderWide...1%,1,0
   //Center horizontal line for slider "object" construction
   ProgressBar=msProgressBar3,%SliderXnegComp...1%,%SliderYcenter...1%,%SliderWide...1%,1,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar4,%SliderXnegComp...1%,%SliderYposComp...1%,%SliderWide...1%,1,0
   //Button used for slider
   Button=.,%ButtonX...1%,%ButtonY...1%,%ButtonWide...1%,%ButtonTall...1%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" construction
   ProgressBar=msProgressBar5,%SliderXstart...2%,%SliderYstart...2%,1,%SliderTall...2%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar6,%SliderXnegComp...2%,%SliderYstart...2%,%SliderWide...2%,1,0
   //Center horizontal line for slider "object" construction
   ProgressBar=msProgressBar7,%SliderXnegComp...2%,%SliderYcenter...2%,%SliderWide...2%,1,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar8,%SliderXnegComp...2%,%SliderYposComp...2%,%SliderWide...2%,1,0
   //Button used for slider
   Button=.,%ButtonX...2%,%ButtonY...2%,%ButtonWide...2%,%ButtonTall...2%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" construction
   ProgressBar=msProgressBar9,%SliderXstart...3%,%SliderYstart...3%,1,%SliderTall...3%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar10,%SliderXnegComp...3%,%SliderYstart...3%,%SliderWide...3%,1,0
   //Center horizontal line for slider "object" construction
   ProgressBar=msProgressBar11,%SliderXnegComp...3%,%SliderYcenter...3%,%SliderWide...3%,1,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar12,%SliderXnegComp...3%,%SliderYposComp...3%,%SliderWide...3%,1,0
   //Button used for slider
   Button=.,%ButtonX...3%,%ButtonY...3%,%ButtonWide...3%,%ButtonTall...3%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
EndDialog>Dialog1

Show>dialog1

OnEvent>WINDOW_NOTOPEN,%Dialog_Window_Name%,2,Exit
OnEvent>KEY_DOWN,VK1,0,SliderMove
Let>VertSliderMoveFlag...1=0
Let>StopMoving...1=0
Let>VertSliderMoveFlag...2=0
Let>StopMoving...2=0
Let>VertSliderMoveFlag...3=0
Let>StopMoving...3=0


Label>Loop
If>VertSliderMoveFlag...1>0
  Add>VertSliderMoveFlag...1,1
  If>VertSliderMoveFlag...1>10
    Let>VertSliderMoveFlag...1=0
    Let>StopMoving...1=0
  EndIf
EndIf
If>VertSliderMoveFlag...2>0
  Add>VertSliderMoveFlag...2,1
  If>VertSliderMoveFlag...2>10
    Let>VertSliderMoveFlag...2=0
    Let>StopMoving...2=0
  EndIf
EndIf
If>VertSliderMoveFlag...3>0
  Add>VertSliderMoveFlag...3,1
  If>VertSliderMoveFlag...3>10
    Let>VertSliderMoveFlag...3=0
    Let>StopMoving...3=0
  EndIf
EndIf
//Set slider button color.  In this line "111111" is the color number
GoSub>DrawLine,%dialog1.msbutton1.handle%,ButtonTall...1,111111,0,penlocation...1,ButtonWide...1,penlocation...1
GoSub>DrawLine,%dialog1.msbutton2.handle%,ButtonTall...2,111111,0,penlocation...2,ButtonWide...2,penlocation...2
GoSub>DrawLine,%dialog1.msbutton3.handle%,ButtonTall...3,111111,0,penlocation...3,ButtonWide...3,penlocation...3

Wait>0.01
Goto>Loop



/////////////////////////////////////////////////////////////////////////////
//////////////////////////////SUBROUTINES////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////

SRT>SliderMove
  GetCursorPos>CurX,CurY
  GetWindowPos>%Dialog_Window_Name%,WinX,WinY
  Add>WinY,%OffsetY%
  Sub>CurX,%WinX%
  Sub>CurY,%WinY%
  Sub>cury,%penlocation...1%
  If>{(%VertSliderMoveFlag...1%>0)or((%CurX%>%ButtonX...1%)and(%CurX%<%ButtonXW...1%)and(%CurY%>%SliderYstart...1%)and(%CurY%<%ButtonYH...1%))}
    GoSub>SliderMove...1
  EndIf
  If>{(%VertSliderMoveFlag...2%>0)or((%CurX%>%ButtonX...2%)and(%CurX%<%ButtonXW...2%)and(%CurY%>%SliderYstart...2%)and(%CurY%<%ButtonYH...2%))}
    GoSub>SliderMove...2
  EndIf
  If>{(%VertSliderMoveFlag...3%>0)or((%CurX%>%ButtonX...3%)and(%CurX%<%ButtonXW...3%)and(%CurY%>%SliderYstart...3%)and(%CurY%<%ButtonYH...3%))}
    GoSub>SliderMove...3
  EndIf
END>SliderMove


//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...1


  Let>VertSliderMoveFlag...1=1
  If>%CurY%<%SliderYstart...1%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%SliderYstart...1%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...1=1
  EndIf
  If>%CurY%>%ButtonYH...1%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%ButtonYH...1%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...1=1
  EndIf
  If>StopMoving...1=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...1=0
  EndIf

  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton1.handle%,SomeX,ButtonY...1
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msEdit1"
  Let>Dialog1.msEdit1={%ButtonY...1%-%SliderYstart...1%-%WinY%}
  ResetDialogAction>Dialog1
END>SliderMove...1

/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////

//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...2

  Let>VertSliderMoveFlag...2=1
  If>%CurY%<%SliderYstart...2%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton2.handle%,%ButtonX...2%,%SliderYstart...2%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...2=1
  EndIf
  If>%CurY%>%ButtonYH...2%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton2.handle%,%ButtonX...2%,%ButtonYH...2%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...2=1
  EndIf
  If>StopMoving...2=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton2.handle%,%ButtonX...2%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...2=0
  EndIf

  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton2.handle%,SomeX,ButtonY...2
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msEdit1"
  Let>Dialog1.msEdit2={%ButtonY...2%-%SliderYstart...2%-%WinY%}
  ResetDialogAction>Dialog1
END>SliderMove...2

//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...3

  Let>VertSliderMoveFlag...3=1
  If>%CurY%<%SliderYstart...3%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton3.handle%,%ButtonX...3%,%SliderYstart...3%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...3=1
  EndIf
  If>%CurY%>%ButtonYH...3%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton3.handle%,%ButtonX...3%,%ButtonYH...3%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...3=1
  EndIf
  If>StopMoving...3=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton3.handle%,%ButtonX...3%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...3=0
  EndIf
EndIf
  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton3.handle%,SomeX,ButtonY...3
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msEdit1"
  Let>Dialog1.msEdit3={%ButtonY...3%-%SliderYstart...3%-%WinY%}
  ResetDialogAction>Dialog1
END>SliderMove...3

SRT>Exit
  EditIniFile>%SettingsFile%,Settings,Location1,Dialog1.msEdit1
  EditIniFile>%SettingsFile%,Settings,Location2,Dialog1.msEdit2
  EditIniFile>%SettingsFile%,Settings,Location3,Dialog1.msEdit3
  Exit>0
END>Exit

//DrawLine Usage:
//GoSub>DrawLine,WindowHandle,PenSize,PenColor,XStart,YStart,XEnd,YEnd

SRT>DrawLine
  LibFunc>user32,GetDC,HDC,%DrawLine_var_1%
  LibFunc>gdi32,CreatePen,Penres,0,%DrawLine_var_2%,%DrawLine_var_3%
  LibFunc>gdi32,SelectObject,SOPres,hdc,Penres
  Libfunc>gdi32,MoveToEx,mtres,HDC,%DrawLine_var_4%,%DrawLine_var_5%,0
  LibFunc>gdi32,LineTo,ltres,hdc,%DrawLine_var_6%,%DrawLine_var_7%
  LibFunc>gdi32,DeleteObject,DOres,Penres
  LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC
END>DrawLine
//////////////////////////////DO NOT ALTER///////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Tue Jan 19, 2010 11:02 pm

Here's three sliders controlling the dialog color.

Code: Select all

/////////////////////////////////////////////////////////////////////////////
/////////////////////////////START PROG PARAMS///////////////////////////////
//Save settings file name
Let>SettingsFile=%temp_dir%~LastColorSliderSettings.txt

//Programmer Configurable parameters ...1
//Slider upper left X,Y position in Dialog
Let>SliderXstart...1=100
Let>SliderYstart...1=100

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...1=40
Let>SliderTall...1=255

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...1=30
Let>ButtonTall...1=6

//Slider Thickness
Let>SliderThick...1=2



//Programmer Configurable parameters ...2
//Slider upper left X,Y position in Dialog
Let>SliderXstart...2=200
Let>SliderYstart...2=100

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...2=40
Let>SliderTall...2=255

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...2=30
Let>ButtonTall...2=6

//Slider Thickness
Let>SliderThick...2=2



//Programmer Configurable parameters ...3
//Slider upper left X,Y position in Dialog
Let>SliderXstart...3=300
Let>SliderYstart...3=100

//Slider size
//"SliderTall" is actually the slider range in pixels
Let>SliderWide...3=40
Let>SliderTall...3=255

//Dialog button size, needs to be spec'ed here to calculate max/min locations
Let>ButtonWide...3=30
Let>ButtonTall...3=6

//Slider Thickness
Let>SliderThick...3=2

Let>Dialog_Window_Name=Slider Sample
//////////////////////////////END PROG PARAMS////////////////////////////////
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////
//Calculated parameters ...1
Let>Initial_Location...1={round(%SliderTall...1%/2)}
Let>SliderTall...1=%SliderTall...1%+ButtonTall...1
Let>SliderYcenter...1={round(%SliderYstart...1%+(%SliderTall...1%/2))}
Let>ButtonX...1={%SliderXstart...1%-(round(%ButtonWide...1%/2))}
Let>ButtonY...1={round(%SliderYcenter...1%-(%ButtonTall...1%/2))}
Let>SliderXnegComp...1={%SliderXstart...1%-(round(%SliderWide...1%/2))}
Let>SliderYposComp...1=%SliderYstart...1%+%SliderTall...1%
Let>ButtonXW...1=%ButtonX...1%+%SliderWide...1%
Let>ButtonYH...1=%SliderYposComp...1%-%ButtonTall...1%
Let>penlocation...1={round(%ButtonTall...1%/2)}


//Calculated parameters ...2
Let>Initial_Location...2={round(%SliderTall...2%/2)}
Let>SliderTall...2=%SliderTall...2%+ButtonTall...2
Let>SliderYcenter...2={round(%SliderYstart...2%+(%SliderTall...2%/2))}
Let>ButtonX...2={%SliderXstart...2%-(round(%ButtonWide...2%/2))}
Let>ButtonY...2={round(%SliderYcenter...2%-(%ButtonTall...2%/2))}
Let>SliderXnegComp...2={%SliderXstart...2%-(round(%SliderWide...2%/2))}
Let>SliderYposComp...2=%SliderYstart...2%+%SliderTall...2%
Let>ButtonXW...2=%ButtonX...2%+%SliderWide...2%
Let>ButtonYH...2=%SliderYposComp...2%-%ButtonTall...2%
Let>penlocation...2={round(%ButtonTall...2%/2)}


//Calculated parameters ...3
Let>Initial_Location...3={round(%SliderTall...3%/2)}
Let>SliderTall...3=%SliderTall...3%+ButtonTall...3
Let>SliderYcenter...3={round(%SliderYstart...3%+(%SliderTall...3%/2))}
Let>ButtonX...3={%SliderXstart...3%-(round(%ButtonWide...3%/2))}
Let>ButtonY...3={round(%SliderYcenter...3%-(%ButtonTall...3%/2))}
Let>SliderXnegComp...3={%SliderXstart...3%-(round(%SliderWide...3%/2))}
Let>SliderYposComp...3=%SliderYstart...3%+%SliderTall...3%
Let>ButtonXW...3=%ButtonX...3%+%SliderWide...3%
Let>ButtonYH...3=%SliderYposComp...3%-%ButtonTall...3%
Let>penlocation...3={round(%ButtonTall...3%/2)}

//Acquire prior settings if they exist
IfFileExists>%SettingsFile%
  ReadIniFile>%SettingsFile%,Settings,Location1,Initial_Location...1
  ReadIniFile>%SettingsFile%,Settings,Location2,Initial_Location...2
  ReadIniFile>%SettingsFile%,Settings,Location3,Initial_Location...3
  Let>ButtonY...1=%Initial_Location...1%+%SliderYstart...1%
  Let>ButtonY...2=%Initial_Location...2%+%SliderYstart...2%
  Let>ButtonY...3=%Initial_Location...3%+%SliderYstart...3%
Else
  WriteLn>%SettingsFile%,wres,[Settings]
  WriteLn>%SettingsFile%,wres,Location1=%Initial_Location...1%
  WriteLn>%SettingsFile%,wres,Location2=%Initial_Location...2%
  WriteLn>%SettingsFile%,wres,Location3=%Initial_Location...3%
EndIf
//One time only acquire title bar size
Dialog>TitleBarSizeCalculation
Button=1,0,0,75,25,0
EndDialog>TitleBarSizeCalculation
Let>WIN_USEHANDLE=1
GetWindowPos>TitleBarSizeCalculation.msButton1.handle,OffSetX,OffSetY
Let>WIN_USEHANDLE=0

RGB>%Initial_Location...1%,%Initial_Location...2%,%Initial_Location...3%,color


//////////////////////////////DO NOT ALTER///////////////////////////////////
/////////////////////////////////////////////////////////////////////////////


//Sample dialog configurable to taste except for the sliders section
//Make sure the dialog is big enough to accomodate the slider
Dialog>Dialog1
   Caption=%Dialog_Window_Name%
   Width=550
   Height=450
   Top=100
   Left=20
   Label=%Initial_Location...1%,80,50,True
   Label=%Initial_Location...2%,180,50,True
   Label=%Initial_Location...3%,280,50,True
   Label=%color%,380,50,True
   ///////       PLACE NO BUTTONS OR PROGRESS BARS ABOVE THIS LINE        //////
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" construction
   ProgressBar=msProgressBar1,%SliderXstart...1%,%SliderYstart...1%,%SliderThick...1%,%SliderTall...1%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar2,%SliderXnegComp...1%,%SliderYstart...1%,%SliderWide...1%,%SliderThick...1%,0
   //Center horizontal line for slider "object" construction
   //ProgressBar=msProgressBar3,%SliderXnegComp...1%,%SliderYcenter...1%,%SliderWide...1%,%SliderThick...1%,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar4,%SliderXnegComp...1%,%SliderYposComp...1%,%SliderWide...1%,%SliderThick...1%,0
   //Button used for slider
   Button=.,%ButtonX...1%,%ButtonY...1%,%ButtonWide...1%,%ButtonTall...1%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" constructio
   ProgressBar=msProgressBar5,%SliderXstart...2%,%SliderYstart...2%,%SliderThick...2%,%SliderTall...2%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar6,%SliderXnegComp...2%,%SliderYstart...2%,%SliderWide...2%,%SliderThick...2%,0
   //Center horizontal line for slider "object" construction
   //ProgressBar=msProgressBar7,%SliderXnegComp...2%,%SliderYcenter...2%,%SliderWide...2%,%SliderThick...2%,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar8,%SliderXnegComp...2%,%SliderYposComp...2%,%SliderWide...2%,%SliderThick...2%,0
   //Button used for slider
   Button=.,%ButtonX...2%,%ButtonY...2%,%ButtonWide...2%,%ButtonTall...2%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   ///////////SLIDER OBJECT DO NOT ALTER. SET PARAMS AT TOP OF SCRIPT///////////
   //Vertical line for slider "object" construction
   ProgressBar=msProgressBar9,%SliderXstart...3%,%SliderYstart...3%,%SliderThick...3%,%SliderTall...3%,0
   //Top horizontal line for slider "object" construction
   ProgressBar=msProgressBar10,%SliderXnegComp...3%,%SliderYstart...3%,%SliderWide...3%,%SliderThick...3%,0
   //Center horizontal line for slider "object" construction
   //ProgressBar=msProgressBar11,%SliderXnegComp...3%,%SliderYcenter...3%,%SliderWide...3%,%SliderThick...3%,0
   //Bottom horizontal line for slider "object" construction
   ProgressBar=msProgressBar12,%SliderXnegComp...3%,%SliderYposComp...3%,%SliderWide...3%,%SliderThick...3%,0
   //Button used for slider
   Button=.,%ButtonX...3%,%ButtonY...3%,%ButtonWide...3%,%ButtonTall...3%,0
   ////////////////////END SLIDER OBJECT DO NOT ALTER///////////////////////////
   /////////////////////////////////////////////////////////////////////////////
   Button=Save To%CRLF%Clipboard,385,140,100,35,100
   Label=Red,90,35,True
   Label=Green,186,35,True
   Label=Blue,290,35,True
EndDialog>Dialog1

Show>dialog1

OnEvent>DIALOG_EVENT,Dialog1,100,Save
OnEvent>WINDOW_NOTOPEN,%Dialog_Window_Name%,2,Exit
OnEvent>KEY_DOWN,VK1,0,SliderMove
Let>VertSliderMoveFlag...1=0
Let>StopMoving...1=0
Let>VertSliderMoveFlag...2=0
Let>StopMoving...2=0
Let>VertSliderMoveFlag...3=0
Let>StopMoving...3=0
SetDialogObjectColor>Dialog1,,color



Label>Loop
If>VertSliderMoveFlag...1>0
  Add>VertSliderMoveFlag...1,1
  If>VertSliderMoveFlag...1>5
    Let>VertSliderMoveFlag...1=0
    Let>StopMoving...1=0
  EndIf
EndIf
If>VertSliderMoveFlag...2>0
  Add>VertSliderMoveFlag...2,1
  If>VertSliderMoveFlag...2>5
    Let>VertSliderMoveFlag...2=0
    Let>StopMoving...2=0
  EndIf
EndIf
If>VertSliderMoveFlag...3>0
  Add>VertSliderMoveFlag...3,1
  If>VertSliderMoveFlag...3>5
    Let>VertSliderMoveFlag...3=0
    Let>StopMoving...3=0
  EndIf
EndIf
GoSub>Contrast
Wait>0.01
Goto>Loop



/////////////////////////////////////////////////////////////////////////////
//////////////////////////////SUBROUTINES////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////

SRT>SliderMove
  GetCursorPos>CurX,CurY
  GetWindowPos>%Dialog_Window_Name%,WinX,WinY
  Add>WinY,%OffsetY%
  Sub>CurX,%WinX%
  Sub>CurY,%WinY%
  Sub>cury,%penlocation...1%
  If>{(%VertSliderMoveFlag...1%>0)or((%CurX%>%ButtonX...1%)and(%CurX%<%ButtonXW...1%)and(%CurY%>%SliderYstart...1%)and(%CurY%<%ButtonYH...1%))}
    GoSub>SliderMove...1
  EndIf
  If>{(%VertSliderMoveFlag...2%>0)or((%CurX%>%ButtonX...2%)and(%CurX%<%ButtonXW...2%)and(%CurY%>%SliderYstart...2%)and(%CurY%<%ButtonYH...2%))}
    GoSub>SliderMove...2
  EndIf
  If>{(%VertSliderMoveFlag...3%>0)or((%CurX%>%ButtonX...3%)and(%CurX%<%ButtonXW...3%)and(%CurY%>%SliderYstart...3%)and(%CurY%<%ButtonYH...3%))}
    GoSub>SliderMove...3
  EndIf
    RGB>%Dialog1.msLabel1%,%Dialog1.msLabel2%,%Dialog1.msLabel3%,color
  SetDialogObjectColor>Dialog1,,color

END>SliderMove

//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...1


  Let>VertSliderMoveFlag...1=1
  If>%CurY%<%SliderYstart...1%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%SliderYstart...1%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...1=1
  EndIf
  If>%CurY%>%ButtonYH...1%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%ButtonYH...1%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...1=1
  EndIf
  If>StopMoving...1=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton1.handle%,%ButtonX...1%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...1=0
  EndIf

  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton1.handle%,SomeX,ButtonY...1
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msLabel1"
  Let>Dialog1.msLabel1={%ButtonY...1%-%SliderYstart...1%-%WinY%}
      RGB>%Dialog1.msLabel1%,%Dialog1.msLabel2%,%Dialog1.msLabel3%,color
      Let>Dialog1.msLabel4=%color%
  SetDialogObjectColor>Dialog1,,color
  ResetDialogAction>Dialog1
END>SliderMove...1

/////////////////////////////////////////////////////////////////////////////
//////////////////////////////DO NOT ALTER///////////////////////////////////

//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...2

  Let>VertSliderMoveFlag...2=1
  If>%CurY%<%SliderYstart...2%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton2.handle%,%ButtonX...2%,%SliderYstart...2%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...2=1
  EndIf
  If>%CurY%>%ButtonYH...2%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton2.handle%,%ButtonX...2%,%ButtonYH...2%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...2=1
  EndIf
  If>StopMoving...2=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton2.handle%,%ButtonX...2%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...2=0
  EndIf

  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton2.handle%,SomeX,ButtonY...2
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msLabel1"
  Let>Dialog1.msLabel2={%ButtonY...2%-%SliderYstart...2%-%WinY%}
      RGB>%Dialog1.msLabel1%,%Dialog1.msLabel2%,%Dialog1.msLabel3%,color
  SetDialogObjectColor>Dialog1,,color
  Let>Dialog1.msLabel4=%color%
  ResetDialogAction>Dialog1
END>SliderMove...2

//This subroutine controls the slider movement
//Don't make any changes unless you have a backup
SRT>SliderMove...3

  Let>VertSliderMoveFlag...3=1
  If>%CurY%<%SliderYstart...3%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton3.handle%,%ButtonX...3%,%SliderYstart...3%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...3=1
  EndIf
  If>%CurY%>%ButtonYH...3%
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton3.handle%,%ButtonX...3%,%ButtonYH...3%
    Let>WIN_USEHANDLE=0
    Let>StopMoving...3=1
  EndIf
  If>StopMoving...3=0
    Let>WIN_USEHANDLE=1
    MoveWindow>%dialog1.msbutton3.handle%,%ButtonX...3%,%CurY%
    Let>WIN_USEHANDLE=0
  Else
    Let>StopMoving...3=0
  EndIf
EndIf
  Let>WIN_USEHANDLE=1
  GetWindowPos>%dialog1.msbutton3.handle%,SomeX,ButtonY...3
  Let>WIN_USEHANDLE=0

  //The next line is the usable output of the slider
  //In this case the output is being set to the variable "Dialog1.msLabel1"
  Let>Dialog1.msLabel3={%ButtonY...3%-%SliderYstart...3%-%WinY%}
      RGB>%Dialog1.msLabel1%,%Dialog1.msLabel2%,%Dialog1.msLabel3%,color
  SetDialogObjectColor>Dialog1,,color
  Let>Dialog1.msLabel4=%color%
  ResetDialogAction>Dialog1
END>SliderMove...3

SRT>Exit
  EditIniFile>%SettingsFile%,Settings,Location1,Dialog1.msLabel1
  EditIniFile>%SettingsFile%,Settings,Location2,Dialog1.msLabel2
  EditIniFile>%SettingsFile%,Settings,Location3,Dialog1.msLabel3
  Exit>0
END>Exit

SRT>Save
  RGB>%Dialog1.msLabel1%,%Dialog1.msLabel2%,%Dialog1.msLabel3%,color
  PutClipBoard>Color
  Let>Dialog1.msLabel4=%color%%CRLF% Saved to%CRLF% Clipboard
  ResetDialogAction>Dialog1
END>Save

SRT>Contrast
  //Set slider button and label text color to be different from the background
  Let>TextRed=%Dialog1.msLabel1%+130
  Let>TextGrn=%Dialog1.msLabel2%+130
  Let>TextBlu=%Dialog1.msLabel3%+130
  RGB>TextRed,TextGrn,TextBlu,TextColor
  GoSub>DrawLine,%dialog1.msbutton1.handle%,ButtonTall...1,TextColor,0,penlocation...1,ButtonWide...1,penlocation...1
  GoSub>DrawLine,%dialog1.msbutton2.handle%,ButtonTall...2,TextColor,0,penlocation...2,ButtonWide...2,penlocation...2
  GoSub>DrawLine,%dialog1.msbutton3.handle%,ButtonTall...3,TextColor,0,penlocation...3,ButtonWide...3,penlocation...3
  SetDialogObjectFont>Dialog1,msLabel1,Arial,18,0,TextColor
  SetDialogObjectFont>Dialog1,msLabel2,Arial,18,0,TextColor
  SetDialogObjectFont>Dialog1,msLabel3,Arial,18,0,TextColor
  SetDialogObjectFont>Dialog1,msLabel4,Arial,18,0,TextColor

  SetDialogObjectFont>Dialog1,msLabel5,Arial,9,1,TextColor
  SetDialogObjectFont>Dialog1,msLabel6,Arial,9,1,TextColor
  SetDialogObjectFont>Dialog1,msLabel7,Arial,9,1,TextColor
END>Contrast

//DrawLine Usage:
//GoSub>DrawLine,WindowHandle,PenSize,PenColor,XStart,YStart,XEnd,YEnd

SRT>DrawLine
  LibFunc>user32,GetDC,HDC,%DrawLine_var_1%
  LibFunc>gdi32,CreatePen,Penres,0,%DrawLine_var_2%,%DrawLine_var_3%
  LibFunc>gdi32,SelectObject,SOPres,hdc,Penres
  Libfunc>gdi32,MoveToEx,mtres,HDC,%DrawLine_var_4%,%DrawLine_var_5%,0
  LibFunc>gdi32,LineTo,ltres,hdc,%DrawLine_var_6%,%DrawLine_var_7%
  LibFunc>gdi32,DeleteObject,DOres,Penres
  LibFunc>user32,ReleaseDC,RDCres,HDC_1,HDC
END>DrawLine
//////////////////////////////DO NOT ALTER///////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed Feb 17, 2010 12:14 am

sarver311 wrote:JRL,

Excellent work. It seems like there is no end to the tricks and techniques that can get squeezed out of Macro Scheduler. Thank you for your contributions and sharing this with everyone!
I'll second that, thanks again JRL... amazing stuff.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Wed Feb 17, 2010 12:40 am

Another Just Right Language script that does wonders!

A nice touch to have the Copy to Cliboard button. It's little small things that make the magical stuff even more satisfying.



Here is my gift to you, Dick.... you can have the copyright © for Just Right Language script
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
JRL
Automation Wizard
Posts: 3529
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Feb 17, 2010 3:34 am

Thanks Bob! :D

Copyright, there's a topic I rarely think much about. Anyone selling their work probably has to stay aware of it perpetually. I'm not really sure how it applies to samples posted in the forum. Does anyone here know much about it?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts